Messages in this thread |  | | From | "Albert Bartoszko" <> | Subject | [PATCH] binfmt_misc.c, kernel-2.4.12 | Date | Fri, 19 Oct 2001 13:54:23 +0200 |
| |
Hello
I find bug in binfmt_misc.c from kernel 2.4.12 source. The read() syscal return bad value, causes some application SIGSEGV.
Example:
# modprobe binfmt_misc # echo ':Java:M::\xca\xfe\xba\xbe::/usr/local/bin/javawrapper:' >/proc/sys/fs/binfmt_misc/register
# strace less /proc/sys/fs/binfmt_misc/Java ............................................................... ............................................................... open("/proc/sys/fs/binfmt_misc/Java", O_RDONLY) = 3 lseek(3, 1, SEEK_SET) = 1 lseek(3, 0, SEEK_SET) = 0 read(3, "enabled\ninterpreter /usr/local/b"..., 64) = 71
^^^^^^^^ --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++
I send a patch I wrote that correct this problem and do same cleanup, so source and object are a bit smaller.
Albert Bartoszko albertb@nt.kegel.com.pl
[unhandled content-type:application/octet-stream][unhandled content-type:application/octet-stream] |  |