• Sam Ravnborg's avatar
    [PATCH] kbuild: fix buffer overflow in modpost · 7670f023
    Sam Ravnborg authored
    Jiri Benc <jbenc@suse.cz> reported that modpost would stop with SIGABRT if
    used with long filepaths.
    The error looked like:
    >   Building modules, stage 2.
    >   MODPOST
    > *** glibc detected *** scripts/mod/modpost: realloc(): invalid next size:
    +0x0809f588 ***
    > [...]
    
    Fix this by allocating at least the required memory + SZ bytes each time.
    Before we sometimes ended up allocating too little memory resuting in the
    glibc detected bug above.  Based on patch originally submitted by: Jiri
    Benc <jbenc@suse.cz>
    Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    7670f023
Name
Last commit
Last update
..
basic Loading commit data...
genksyms Loading commit data...
kconfig Loading commit data...
ksymoops Loading commit data...
mod Loading commit data...
package Loading commit data...
.gitignore Loading commit data...
Kbuild.include Loading commit data...
Lindent Loading commit data...
Makefile Loading commit data...
Makefile.build Loading commit data...
Makefile.clean Loading commit data...
Makefile.host Loading commit data...
Makefile.lib Loading commit data...
Makefile.modinst Loading commit data...
Makefile.modpost Loading commit data...
bin2c.c Loading commit data...
binoffset.c Loading commit data...
bloat-o-meter Loading commit data...
checkconfig.pl Loading commit data...
checkincludes.pl Loading commit data...
checkstack.pl Loading commit data...
checkversion.pl Loading commit data...
conmakehash.c Loading commit data...
extract-ikconfig Loading commit data...
gcc-version.sh Loading commit data...
gen_initramfs_list.sh Loading commit data...
kallsyms.c Loading commit data...
kernel-doc Loading commit data...
makelst Loading commit data...
mkcompile_h Loading commit data...
mkmakefile Loading commit data...
mksysmap Loading commit data...
mkuboot.sh Loading commit data...
mkversion Loading commit data...
namespace.pl Loading commit data...
patch-kernel Loading commit data...
pnmtologo.c Loading commit data...
reference_discarded.pl Loading commit data...
reference_init.pl Loading commit data...
setlocalversion Loading commit data...
show_delta Loading commit data...
ver_linux Loading commit data...