lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0702031236340.27840@yvahk01.tjqt.qr>
Date:	Sat, 3 Feb 2007 12:38:47 +0100 (MET)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Russell King <rmk+lkml@....linux.org.uk>
cc:	Bodo Eggert <7eggert@....de>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>,
	Jon Masters <jonathan@...masters.org>,
	Alexey Dobriyan <adobriyan@...il.com>
Subject: Re: [PATCH/RFC] alternative aproach to: Ban module license tag string
 termination trick


On Feb 3 2007 08:14, Russell King wrote:
>On Sat, Feb 03, 2007 at 03:08:14AM +0100, Bodo Eggert wrote:
>> This patch changes the module license handling code to:
>> - prevent the "GPL\0 for nothing"-trick
>
>You can achieve this effect without changing the existing module
>format, and it's far more difficult to bypass with build-with-
>modified module.h tricks.
>
>+static int check_modinfo_objects(Elf_Shdr *sechdrs,
>+				 unsigned int symindex,
>+				 unsigned int infoindex)
>+{
>+	unsigned int i;
>+	Elf_Sym *sym = (void *)sechdrs[symindex].sh_addr;
>+	char *info = (char *)sechdrs[infoindex].sh_addr;
>+
>+	for (i = 1; i < sechdrs[symindex].sh_size/sizeof(*sym); i++) {
>+		if (sym[i].st_shndx == infoindex &&
>+		    ELF_ST_TYPE(sym[i].st_info) == STT_OBJECT) {
>+			if (strlen(info + sym[i].st_value) + 1 != sym[i].st_size)
>+				return -ENOEXEC;
>+		}
>+	}

What happens when there is no symbol for the "license=GPL\0foo..." string?
To me it looks like we'll miss it.



Jan
-- 
ft: http://freshmeat.net/p/chaostables/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ