Whamcloud - gitweb
libext2fs: Add checks to prevent integer overflows passed to malloc()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 10 Nov 2007 00:01:06 +0000 (19:01 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Dec 2007 02:01:35 +0000 (21:01 -0500)
commitee01079a17bfecd17292ccd60058056fb3a8ba6c
tree9968e184b908372bc30667820cfcd5a16adbb7f5
parent7ce238977a4bc9c5965617d76848477abad0f76a
libext2fs: Add checks to prevent integer overflows passed to malloc()

This addresses a potential security vulnerability where an untrusted
filesystem can be corrupted in such a way that a program using
libext2fs will allocate a buffer which is far too small.  This can
lead to either a crash or potentially a heap-based buffer overflow
crash.  No known exploits exist, but main concern is where an
untrusted user who possesses privileged access in a guest Xen
environment could corrupt a filesystem which is then accessed by the
pygrub program, running as root in the dom0 host environment, thus
allowing the untrusted user to gain privileged access in the host OS.

Thanks to the McAfee AVERT Research group for reporting this issue.

Addresses CVE-2007-5497.

Signed-off-by: Rafal Wojtczuk <rafal_wojtczuk@mcafee.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 files changed:
lib/ext2fs/badblocks.c
lib/ext2fs/bb_inode.c
lib/ext2fs/block.c
lib/ext2fs/bmap.c
lib/ext2fs/bmove.c
lib/ext2fs/brel_ma.c
lib/ext2fs/closefs.c
lib/ext2fs/dblist.c
lib/ext2fs/dupfs.c
lib/ext2fs/ext2fs.h
lib/ext2fs/fileio.c
lib/ext2fs/icount.c
lib/ext2fs/initialize.c
lib/ext2fs/inode.c
lib/ext2fs/irel_ma.c
lib/ext2fs/openfs.c
lib/ext2fs/res_gdt.c