Whamcloud - gitweb
libext2fs/e2fsck: don't run off the end of the EA block
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 10 Aug 2014 22:22:07 +0000 (18:22 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 10 Aug 2014 22:22:07 +0000 (18:22 -0400)
commit88334ce084ef45929d7aacff5af283994358c5d6
treecc461ba86fd11c5d9c229e7ff8960a809a483f99
parent71e177a2a52a6253f03ca5218017e6b7a4a01ec6
libext2fs/e2fsck: don't run off the end of the EA block

When we're (a) reading EAs into a buffer; (b) byte-swapping EA
entries; or (c) checking EA data, be careful not to run off the end of
the memory buffer, because this causes invalid memory accesses and
e2fsck crashes.  This can happen if we encounter a specially crafted
FS image.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c
lib/ext2fs/ext_attr.c
lib/ext2fs/swapfs.c