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>] [day] [month] [year] [list]
Message-ID: <1681f2df0702260853u59ee7499nf2751034d5a2ec61@mail.gmail.com>
Date:	Mon, 26 Feb 2007 11:53:40 -0500
From:	"Chris Rohlf" <chris.rohlf@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: binfmt_elf.c EI_CLASS check patch

During some research of mine I realized most of my ELF analysis tools
break on ELF objects with an ELF header e_ident[EI_CLASS] not equal to
 ELFCLASS32 or ELFCLASS64. These objects still work fine because the
ELF  loader code does not check this value upon execution. So I wrote
a quick  patch to do it.

--- binfmt_elf.c.or1    2007-02-25 18:46:29.000000000 -0500
+++ binfmt_elf.c        2007-02-25 17:35:29.000000000 -0500
@@ -573,6 +573,10 @@ static int load_elf_binary(struct linux_
       if (!bprm->file->f_op||!bprm->file->f_op->mmap)
               goto out;

+        if (loc->elf_ex.e_ident[EI_CLASS] != ELFCLASS32 &&
+                loc->elf_ex.e_ident[EI_CLASS] != ELFCLASS64)
+                goto out;
+
       /* Now read in all of the header information */
       if (loc->elf_ex.e_phentsize != sizeof(struct elf_phdr))
               goto out;


I am not on the list, please CC replies to me.

Chris

-- 

http://em386.blogspot.com
-
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