public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check
@ 2024-11-18  9:20 Bin Lan
  2024-11-19  4:36 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Bin Lan @ 2024-11-18  9:20 UTC (permalink / raw)
  To: gregkh, stable

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

[ Upstream commit c4a8ba334262e9a5c158d618a4820e1b9c12495c ]

Reported-by: syzbot+c6d94bedd910a8216d25@syzkaller.appspotmail.com
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
---
 fs/ntfs3/record.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index 7ab452710572..0cdff04d084b 100644
--- a/fs/ntfs3/record.c
+++ b/fs/ntfs3/record.c
@@ -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;
-- 
2.43.0


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

* Re: [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check
  2024-11-18  9:20 [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check Bin Lan
@ 2024-11-19  4:36 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2024-11-19  4:36 UTC (permalink / raw)
  To: stable; +Cc: Bin Lan, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: c4a8ba334262e9a5c158d618a4820e1b9c12495c

WARNING: Author mismatch between patch and upstream commit:
Backport author: Bin Lan <bin.lan.cn@windriver.com>
Commit author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>

Commit in newer trees:

|-----------------|----------------------------------------------|
| 6.11.y          |  Present (different SHA1: 2fcae4c2014a)      |
| 6.6.y           |  Present (different SHA1: e91fbb21f248)      |
| 6.1.y           |  Not found                                   |
|-----------------|----------------------------------------------|

Note: The patch differs from the upstream commit:
---
--- -	2024-11-18 16:25:39.098066139 -0500
+++ /tmp/tmp.DxOAMDGPlz	2024-11-18 16:25:39.090757957 -0500
@@ -1,14 +1,17 @@
+[ Upstream commit c4a8ba334262e9a5c158d618a4820e1b9c12495c ]
+
 Reported-by: syzbot+c6d94bedd910a8216d25@syzkaller.appspotmail.com
 Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
+Signed-off-by: Bin Lan <bin.lan.cn@windriver.com>
 ---
  fs/ntfs3/record.c | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
-index 2a375247b3c09..427c71be0f087 100644
+index 7ab452710572..0cdff04d084b 100644
 --- a/fs/ntfs3/record.c
 +++ b/fs/ntfs3/record.c
-@@ -331,6 +331,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
+@@ -329,6 +329,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
  
  		if (attr->nres.c_unit)
  			return NULL;
@@ -18,3 +21,6 @@
  	}
  
  	return attr;
+-- 
+2.43.0
+
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |

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

end of thread, other threads:[~2024-11-19  4:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18  9:20 [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check Bin Lan
2024-11-19  4:36 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox