diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-10-16 19:36:59 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-01-06 11:52:15 +0100 |
commit | f0cad89f5e8ef8b6d0c065115565524137e44f0b (patch) | |
tree | 8eea669cb0317a2894edff505b132c5d3eb6fcfb /fs/ext3/xattr.h | |
parent | ad692bf3ea035fa5a9d56462cf3df97d9607cced (diff) | |
download | op-kernel-dev-f0cad89f5e8ef8b6d0c065115565524137e44f0b.zip op-kernel-dev-f0cad89f5e8ef8b6d0c065115565524137e44f0b.tar.gz |
ext3: Avoid uninitialized memory references with a corrupted htree directory
If the first htree directory is missing '.' or '..' but is otherwise a
valid directory, and we do a lookup for '.' or '..', it's possible to
dereference an uninitialized memory pointer in ext3_htree_next_block().
Avoid this.
We avoid this by moving the special case from ext3_dx_find_entry() to
ext3_find_entry(); this also means we can optimize ext3_find_entry()
slightly when NFS looks up "..".
Thanks to Brad Spengler for pointing a Clang warning that led me to
look more closely at this code. The warning was harmless, but it was
useful in pointing out code that was too ugly to live. This warning was
also reported by Roman Borisov.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
Cc: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/xattr.h')
0 files changed, 0 insertions, 0 deletions