Skip to contentSkip to conversation

fs/ntfs3: Add rough attr alloc_size check

PATCH New Bin Lan 1 participant 1 message Nov 18, 2024 Stable branch

lore
Share & tools
lore

Bin Lan

author
#0 lore raw

PATCH 1/1 fs/ntfs3: Add rough attr alloc_size check

From: Konstantin Komarov <[email protected]>

[ Upstream commit c4a8ba334262e9a5c158d618a4820e1b9c12495c ]

---
 fs/ntfs3/record.c | 3 +++
 1 file changed, 3 insertions(+)
fs/ntfs3/record.c +3 -0
index 7ab452710572..0cdff04d084b 100644
@@ -329,6 +329,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
 
 		if (attr->nres.c_unit)
 			return NULL;
+
+		if (alloc_size > mi->sbi->volume.size)
+			return NULL;
 	}
 
 	return attr;
Signature · 1 line
2.43.0