patch-2.2.16 linux/fs/binfmt_elf.c

Next file: linux/fs/buffer.c
Previous file: linux/drivers/video/vga16fb.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
@@ -376,6 +376,9 @@
 		goto out;
 	}
 
+	if ((unsigned long)addr + text_data < text_data)
+		goto out;
+
 	do_mmap(NULL, 0, text_data,
 		PROT_READ|PROT_WRITE|PROT_EXEC, MAP_FIXED|MAP_PRIVATE, 0);
 	retval = read_exec(interpreter_dentry, offset, addr, text_data, 0);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)