stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr()
@ 2025-03-28  9:18 bin.lan.cn
  2025-03-28 17:03 ` Sasha Levin
  2025-04-22 13:30 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: bin.lan.cn @ 2025-03-28  9:18 UTC (permalink / raw)
  To: gregkh, stable; +Cc: rtm, bin.lan.cn, almaz.alexandrovich

From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

[ Upstream commit 652cfeb43d6b9aba5c7c4902bed7a7340df131fb ]

Reported-by: Robert Morris <rtm@csail.mit.edu>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
---
Build test passed.
---
 fs/ntfs3/record.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index 383fc3437f02..fb0683c983cf 100644
--- a/fs/ntfs3/record.c
+++ b/fs/ntfs3/record.c
@@ -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 &&
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr()
  2025-03-28  9:18 [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr() bin.lan.cn
@ 2025-03-28 17:03 ` Sasha Levin
  2025-04-22 13:30 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2025-03-28 17:03 UTC (permalink / raw)
  To: stable; +Cc: bin.lan.cn, Sasha Levin

[ 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: bin.lan.cn@windriver.com
Commit author: Konstantin Komarov<almaz.alexandrovich@paragon-software.com>

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   |

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr()
  2025-03-28  9:18 [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr() bin.lan.cn
  2025-03-28 17:03 ` Sasha Levin
@ 2025-04-22 13:30 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2025-04-22 13:30 UTC (permalink / raw)
  To: bin.lan.cn; +Cc: stable, rtm, almaz.alexandrovich

On Fri, Mar 28, 2025 at 05:18:24PM +0800, bin.lan.cn@windriver.com wrote:
> From: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> 
> [ Upstream commit 652cfeb43d6b9aba5c7c4902bed7a7340df131fb ]
> 
> Reported-by: Robert Morris <rtm@csail.mit.edu>
> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
> Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
> Signed-off-by: He Zhe <zhe.he@windriver.com>
> ---
> Build test passed.
> ---

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-22 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28  9:18 [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr() bin.lan.cn
2025-03-28 17:03 ` Sasha Levin
2025-04-22 13:30 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).