Skip to contentSkip to conversation

fs/ntfs3: Fixed overflow check in mi_enum_attr()

PATCH In review [email protected] 3 participants 3 messages Mar 28, 2025 – Apr 22, 2025 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ntfs3: Fixed overflow check in mi_enum_attr()

From: Konstantin Komarov <[email protected]>

[ Upstream commit 652cfeb43d6b9aba5c7c4902bed7a7340df131fb ]

---
Build test passed.

---
 fs/ntfs3/record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ntfs3/record.c +1 -1
index 383fc3437f02..fb0683c983cf 100644
@@ -263,7 +263,7 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
 			return NULL;
 
 		t32 = le32_to_cpu(attr->res.data_size);
-		if (t16 + t32 > asize)
+		if (t32 > asize - t16)
 			return NULL;
 
 		if (attr->name_len &&
Signature · 1 line
2.34.1
maintainer
#1 lore raw

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected. No action required from the submitter.

The upstream commit SHA1 provided is correct: 652cfeb43d6b9aba5c7c4902bed7a7340df131fb

WARNING: Author mismatch between patch and upstream commit:
Backport author: [email protected]
Commit author: Konstantin Komarov<[email protected]>

Status in newer kernel trees:
6.13.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 8c77398c7261)
6.1.y | Present (different SHA1: e99faa973596)

Note: The patch differs from the upstream commit:
---

1:  652cfeb43d6b9 < -:  ------------- fs/ntfs3: Fixed overflow check in mi_enum_attr()
-:  ------------- > 1:  8f6e53a6ae4e8 fs/ntfs3: Fixed overflow check in mi_enum_attr()

---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y       |  Success    |  Success   |
maintainer
#2 lore raw
In reply to [email protected]
Quoted 11 lines · On Fri, Mar 28, 2025 at 05:18:24PM +0800, [email protected] wrote:

From: Konstantin Komarov <[email protected]>

[ Upstream commit 652cfeb43d6b9aba5c7c4902bed7a7340df131fb ]

---
Build test passed.
---

You didn't document what you changed from the original :(