lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140801181307.12496.76118.stgit@birch.djwong.org>
Date:	Fri, 01 Aug 2014 11:13:07 -0700
From:	"Darrick J. Wong" <darrick.wong@...cle.com>
To:	tytso@....edu, darrick.wong@...cle.com
Cc:	linux-ext4@...r.kernel.org
Subject: [PATCH 13/19] tests: add regression tests for EA blocks with bad
 checksums

From: Darrick J. Wong <darrick.wong@...cle.com>

Add regression tests for e2fsck dealing with (a) EA block with a bad
checksum; (b) EA block with a bad magic number; and (c) EA block with
damage that isn't otherwise noticeable.

Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
 tests/f_ea_bad_csum/expect.1 |   29 +++++++++++++++++++++++++++++
 tests/f_ea_bad_csum/expect.2 |    7 +++++++
 tests/f_ea_bad_csum/image.gz |  Bin
 tests/f_ea_bad_csum/name     |    1 +
 4 files changed, 37 insertions(+)
 create mode 100644 tests/f_ea_bad_csum/expect.1
 create mode 100644 tests/f_ea_bad_csum/expect.2
 create mode 100644 tests/f_ea_bad_csum/image.gz
 create mode 100644 tests/f_ea_bad_csum/name

diff --git a/tests/f_ea_bad_csum/expect.1 b/tests/f_ea_bad_csum/expect.1
new file mode 100644
index 0000000..4fc365f
--- /dev/null
+++ b/tests/f_ea_bad_csum/expect.1
@@ -0,0 +1,29 @@
+Pass 1: Checking inodes, blocks, and sizes
+Inode 12 has a bad extended attribute block 1074.  Clear? yes
+
+Inode 12, i_blocks is 2, should be 0.  Fix? yes
+
+Extended attribute in inode 13 has a hash (1631637196) which is invalid
+Clear? yes
+
+Inode 13, i_blocks is 2, should be 0.  Fix? yes
+
+Inode 14 extended attribute block 1076 passes checks, but checksum does not match block.  Fix? 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:  -(1074--1075)
+Fix? yes
+
+Free blocks count wrong for group #0 (971, counted=973).
+Fix? yes
+
+Free blocks count wrong (971, counted=973).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 14/128 files (7.1% non-contiguous), 1075/2048 blocks
+Exit status is 1
diff --git a/tests/f_ea_bad_csum/expect.2 b/tests/f_ea_bad_csum/expect.2
new file mode 100644
index 0000000..d83fdfb
--- /dev/null
+++ b/tests/f_ea_bad_csum/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: 14/128 files (7.1% non-contiguous), 1075/2048 blocks
+Exit status is 0
diff --git a/tests/f_ea_bad_csum/image.gz b/tests/f_ea_bad_csum/image.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e7a25c512feec33336f18ef0954737e91003269c
GIT binary patch
literal 3176
zcmeIy`&ZHj6aa8qEzO-1Zh53>rA*T$X)MiYK1k1*uSB#`o0_HtElpXH(nKSB=?SL`
z^HFMym71Aa<fAmC5_S1DQFMS53>XSBGDRNW?{}X4*1yp4{&3H|Ki<!|_uA3SVc8D+
z!=J5Ji^Q}e(c57El1>H1#}20-_D}}IGKx%(Q2~yvHtdkES~nnVe8#T7S+HnCeU7vZ
zg981&&EN2)jpGe?_fNI#hh5)9`Il{=vkqAp?023~j0nfil06$;>qS8B+aW)9ozR=4
z5o(@c<g@...ET`b!<gl(Vy~@...IVU(5!sC>}I*`>1We7>Ku!TvlDP(vSzNL?2j^~
zoS^AK*0p3JRW4V?GVdGTSCJA|lmIa)L%6u4YbgP?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#2Fdh+Py2x5V~?^UglTp9D36=A+kFw;tX06x6*V0mQs{@@lH!
z7^y-?3fg^q5Nq9<z?#4(FK|(b_Xv}qv5ISd(N68}DtOS3pbPZpynJlM@hT;YcRW=P
zt6I>+Rmd|P$WrQ4_WAj@...fVR#uSDZokTnTJe4-aI^z40pxFzLeJIzKb|MsK6$vc
W0oMdRZ2`h{3@q4p;W7+n5Bm?Qd!Nbx

literal 0
HcmV?d00001

diff --git a/tests/f_ea_bad_csum/name b/tests/f_ea_bad_csum/name
new file mode 100644
index 0000000..958b244
--- /dev/null
+++ b/tests/f_ea_bad_csum/name
@@ -0,0 +1 @@
+EA block with bad checksum (metadata_csum)

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ