ChangeSet 1.2010, 2005/02/10 14:40:30-08:00, [EMAIL PROTECTED] [PATCH] binfmt_elf: clearing bss may fail So we discover that Borland's Kylix application builder emits weird elf files which describe a non-writeable bss segment. So remove the clear_user() check at the place where we zero out the bss. I don't _think_ there are any security implications here (plus we've never checked that clear_user() return value, so whoops if it is a problem). Signed-off-by: Pavel Machek <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
binfmt_elf.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff -Nru a/fs/binfmt_elf.c b/fs/binfmt_elf.c --- a/fs/binfmt_elf.c 2005-02-10 18:08:30 -08:00 +++ b/fs/binfmt_elf.c 2005-02-10 18:08:30 -08:00 @@ -803,11 +803,13 @@ nbyte = ELF_MIN_ALIGN - nbyte; if (nbyte > elf_brk - elf_bss) nbyte = elf_brk - elf_bss; - if (clear_user((void __user *) elf_bss + load_bias, nbyte)) { - retval = -EFAULT; - send_sig(SIGKILL, current, 0); - goto out_free_dentry; - } + /* + * This bss-zeroing can fail if the ELF file + * specifies odd protections. So we don't check + * the return value + */ + (void)clear_user((void __user *)elf_bss + + load_bias, nbyte); } } - To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html