From: bin.lan.cn@windriver.com
To: gregkh@linuxfoundation.org, stable@vger.kernel.org
Cc: rtm@csail.mit.edu, bin.lan.cn@windriver.com,
almaz.alexandrovich@paragon-software.com
Subject: [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr()
Date: Fri, 28 Mar 2025 17:18:24 +0800 [thread overview]
Message-ID: <20250328091824.1646736-1-bin.lan.cn@windriver.com> (raw)
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
next reply other threads:[~2025-03-28 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 9:18 bin.lan.cn [this message]
2025-03-28 17:03 ` [PATCH 5.15.y] fs/ntfs3: Fixed overflow check in mi_enum_attr() Sasha Levin
2025-04-22 13:30 ` Greg KH
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=20250328091824.1646736-1-bin.lan.cn@windriver.com \
--to=bin.lan.cn@windriver.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=gregkh@linuxfoundation.org \
--cc=rtm@csail.mit.edu \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.