OSDN Git Service

e2fsck: added sanity check for xattr validation
authorAndreas Dilger <adilger@clusterfs.com>
Fri, 22 Jun 2007 06:22:38 +0000 (02:22 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 22 Jun 2007 06:22:38 +0000 (02:22 -0400)
commita34c6ffd687aef4941bbc32793078c13914d3864
treeb65caf8f10f3621d9b14e2672f889c7f1e436042
parente382a7eaded3ec6b38114988ae9b0723bb48002a
e2fsck: added sanity check for xattr validation

Add an extra validity test in check_ext_attr().  If an attribute's
e_value_size is zero the current code does not allocate a region for it
and as a result the e_value_offs value is not verified.  However, if
e_value_offs is very large then the later call to
ext2fs_ext_attr_hash_entry() can dereference bad memory and crash
e2fsck.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Jim Garlick <garlick@llnl.gov>
e2fsck/ChangeLog
e2fsck/pass1.c