Skip to contentSkip to conversation

ntfs-check-for-valid-standard-information-attribute.patch removed from -mm tree

merged [email protected] 1 participant 1 message Feb 25, 2021 Stable branch

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: ntfs: check for valid standard information attribute
has been removed from the -mm tree. Its filename was
ntfs-check-for-valid-standard-information-attribute.patch

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

------------------------------------------------------
From: Rustam Kovhaev <[email protected]>
Subject: ntfs: check for valid standard information attribute

Mounting a corrupted filesystem with NTFS resulted in a kernel crash.

We should check for valid STANDARD_INFORMATION attribute offset and length before trying to access it

---

 fs/ntfs/inode.c |    6 ++++++
 1 file changed, 6 insertions(+)
fs/ntfs/inode.c renamed from fs/ntfs/inode.c~ntfs-check-for-valid-standard-information-attribute +6 -0
@@ -629,6 +629,12 @@ static int ntfs_read_locked_inode(struct
 	}
 	a = ctx->attr;
 	/* Get the standard information attribute value. */
+	if ((u8 *)a + le16_to_cpu(a->data.resident.value_offset)
+			+ le32_to_cpu(a->data.resident.value_length) >
+			(u8 *)ctx->mrec + vol->mft_record_size) {
+		ntfs_error(vi->i_sb, "Corrupt standard information attribute in inode.");
+		goto unm_err_out;
+	}
 	si = (STANDARD_INFORMATION*)((u8*)a +
 			le16_to_cpu(a->data.resident.value_offset));
 

_

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