Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.33 /fs/binfmt_elf.c

Filename:/fs/binfmt_elf.c
Lines Added:6
Lines Deleted:1
Also changed in: (Previous) 2.4.33-rc2  2.4.33-rc1  2.4.33-pre3  2.4.33-pre1  2.4.31  2.4.31-rc2 
(Following) 2.4.33.2  2.4.33.3  2.4.33.4  2.4.33.5  2.4.33.6  2.4.33.7 

Location
[  2.4.33
  [  fs
     o  binfmt_elf.c

Patch

diff -urN linux-2.4.32/fs/binfmt_elf.c linux-2.4.33/fs/binfmt_elf.c
--- linux-2.4.32/fs/binfmt_elf.c   2005-06-01 00:56:56.000000000 +0000
+++ linux-2.4.33/fs/binfmt_elf.c   2006-08-11 04:18:20.963196198 +0000
@@ -643,6 +643,11 @@
       SET_PERSONALITY(elf_ex, ibcs2_interpreter);
    }
 
+   if (BAD_ADDR(elf_ex.e_entry)) {
+      retval = -ENOEXEC;
+      goto out_free_dentry;
+   }
+
    /* OK, we are done with that, now set up the arg stuff,
       and then start this sucker up */
 
@@ -820,7 +825,7 @@
          printk(KERN_ERR "Unable to load interpreter %.128s\n",
             elf_interpreter);
          force_sig(SIGSEGV, current);
-         retval = -ENOEXEC; /* Nobody gets to see this, but.. */
+         retval = IS_ERR((void *)elf_entry) ? PTR_ERR((void *)elf_entry) : -ENOEXEC;
          goto out_free_dentry;
       }
       reloc_func_desc = interp_load_addr;


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.