Skip to contentSkip to conversation

squashfs-fix-length-field-overlap-check-in-metadata-reading.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 24, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: squashfs: fix length field overlap check in metadata reading
has been removed from the -mm tree. Its filename was
squashfs-fix-length-field-overlap-check-in-metadata-reading.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Phillip Lougher <[email protected]>
Subject: squashfs: fix length field overlap check in metadata reading

This is a regression introduced by the "migrate from ll_rw_block usage to BIO" patch.

Squashfs packs structures on byte boundaries, and due to that the length field (of the metadata block) may not be fully in the current block. The new code rewrote and introduced a faulty check for that edge case.

Fixes 93e72b3c612adcaca1 ("squashfs: migrate from ll_rw_block usage to BIO")
Cc Christoph Hellwig <[email protected]>
Cc Adrien Schildknecht <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Daniel Rosenberg <[email protected]>

---

 fs/squashfs/block.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/squashfs/block.c renamed from fs/squashfs/block.c~squashfs-fix-length-field-overlap-check-in-metadata-reading +1 -1
@@ -175,7 +175,7 @@ int squashfs_read_data(struct super_bloc
 		/* Extract the length of the metadata block */
 		data = page_address(bvec->bv_page) + bvec->bv_offset;
 		length = data[offset];
-		if (offset <= bvec->bv_len - 1) {
+		if (offset < bvec->bv_len - 1) {
 			length |= data[offset + 1] << 8;
 		} else {
 			if (WARN_ON_ONCE(!bio_next_segment(bio, &iter_all))) {

_

Patches currently in -mm which might be from [email protected] are