patch-1.3.45 linux/fs/binfmt_elf.c

Next file: linux/fs/block_dev.c
Previous file: linux/drivers/sound/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.44/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -75,7 +75,13 @@
 	nbyte = elf_bss & (PAGE_SIZE-1);
 	if (nbyte) {
 		nbyte = PAGE_SIZE - nbyte;
-		verify_area(VERIFY_WRITE, (void *) elf_bss, nbyte);
+		/* FIXME: someone should investigate, why a bad binary
+		   is allowed to bring a wrong elf_bss until here,
+		   and how to react. Suffice the plain return?
+		   rossius@hrz.tu-chemnitz.de */
+		if (verify_area(VERIFY_WRITE, (void *) elf_bss, nbyte)) {
+			return;
+		}
 		fpnt = (char *) elf_bss;
 		do {
 			put_user(0, fpnt++);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this