mmaped memory.

Mikulas Patocka (mikulas@artax.karlin.mff.cuni.cz)
Fri, 23 Oct 1998 20:43:53 +0200 (MET DST)


generic_file_mmap doesn't clear the space beyond file end in last sector.
It doesn't matter on filesystems that keep zeros beyond file end - like
ext2. But it does matter on msdos and umsdos and many others.

Imagine this: you unpack the kernel on umsdos fs, than you go to dos and
do some operation that moves files, than you go to linux, try to compile
it and get Segmentation fault.

Some programs - like kernel mkdep.c require zeros beyond the end of mmaped
file. This is also a security hole - pieces of /etc/shadow could be found
beyound end of mmaped file on umsdos.

Wants anybody to correct it?

Mikulas Patocka

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/