From: Theodore Ts'o Date: Sat, 7 Apr 2018 05:12:00 +0000 (-0400) Subject: tests: add new test f_ea_inode_self_ref X-Git-Tag: v1.44.2~11 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b46fbf3d52e722d9810dad97a5fa443b280c8a82;p=tools%2Fe2fsprogs.git tests: add new test f_ea_inode_self_ref Make sure we can handle a maliciously created file system containing an inode containing an extended attribute whose e_value_inum points back at itself. Signed-off-by: Theodore Ts'o --- diff --git a/tests/f_ea_inode_self_ref/expect.1 b/tests/f_ea_inode_self_ref/expect.1 new file mode 100644 index 0000000..f94c04d --- /dev/null +++ b/tests/f_ea_inode_self_ref/expect.1 @@ -0,0 +1,17 @@ +Pass 1: Checking inodes, blocks, and sizes +Inode 16 has INLINE_DATA_FL flag but extended attribute not found. Truncate? yes + +Extended attribute in inode 16 has a hash (553648128) which is invalid +Clear? yes + +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +Block bitmap differences: -20 +Fix? yes + + +test_filesys: ***** FILE SYSTEM WAS MODIFIED ***** +test_filesys: 16/16 files (0.0% non-contiguous), 21/100 blocks +Exit status is 1 diff --git a/tests/f_ea_inode_self_ref/expect.2 b/tests/f_ea_inode_self_ref/expect.2 new file mode 100644 index 0000000..9398061 --- /dev/null +++ b/tests/f_ea_inode_self_ref/expect.2 @@ -0,0 +1,7 @@ +Pass 1: Checking inodes, blocks, and sizes +Pass 2: Checking directory structure +Pass 3: Checking directory connectivity +Pass 4: Checking reference counts +Pass 5: Checking group summary information +test_filesys: 16/16 files (0.0% non-contiguous), 21/100 blocks +Exit status is 0 diff --git a/tests/f_ea_inode_self_ref/image.gz b/tests/f_ea_inode_self_ref/image.gz new file mode 100644 index 0000000..3cc733b Binary files /dev/null and b/tests/f_ea_inode_self_ref/image.gz differ diff --git a/tests/f_ea_inode_self_ref/name b/tests/f_ea_inode_self_ref/name new file mode 100644 index 0000000..4e68da8 --- /dev/null +++ b/tests/f_ea_inode_self_ref/name @@ -0,0 +1 @@ +corrupted, self-referential ea_in_inode