From: Bin Lan <bin.lan.cn@windriver.com>
To: <gregkh@linuxfoundation.org>, <stable@vger.kernel.org>
Subject: [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check
Date: Mon, 18 Nov 2024 17:20:06 +0800 [thread overview]
Message-ID: <20241118092006.1494435-1-bin.lan.cn@windriver.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Bin Lan <bin.lan.cn@windriver.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check
Date: Mon, 18 Nov 2024 23:36:07 -0500 [thread overview]
Message-ID: <20241118092006.1494435-1-bin.lan.cn@windriver.com> (raw)
Message-ID: <20241119043607.dIClv-7dde4Xwcw8HwafqosID2i6lPtbVjT_QNM_2wc@z> (raw)
In-Reply-To: <20241118092006.1494435-1-bin.lan.cn@windriver.com>
[ 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 |
next reply other threads:[~2024-11-18 9:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 9:20 Bin Lan [this message]
2024-11-19 4:36 ` [PATCH 6.1] fs/ntfs3: Add rough attr alloc_size check Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241118092006.1494435-1-bin.lan.cn@windriver.com \
--to=bin.lan.cn@windriver.com \
--cc=gregkh@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox