[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CY5PR12MB645583E34E10D7FD71B3D548C6979@CY5PR12MB6455.namprd12.prod.outlook.com>
Date: Sat, 8 Apr 2023 22:52:26 +0530
From: mirimmad@...look.com
To: unlisted-recipients:; (no To-header on input)
Cc: skhan@...uxfoundation.org, Immad Mir <mirimmad17@...il.com>,
syzbot+14a2433710a3affee84e@...kaller.appspotmail.com,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
ntfs3@...ts.linux.dev (open list:NTFS3 FILESYSTEM),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] FS NTFS3: Fix shift-out-of-bounds in attr_set_size
From: Immad Mir <mirimmad17@...il.com>
The bug can be fixed by changing type of 'align'
from u32 to u64
Reported-by: syzbot+14a2433710a3affee84e@...kaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=14a2433710a3affee84e
Signed-off-by: Immad Mir <mirimmad17@...il.com>
---
fs/ntfs3/attrib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index 5e6bafb10..c306aa087 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -415,7 +415,7 @@ int attr_set_size(struct ntfs_inode *ni, enum ATTR_TYPE type,
CLST next_svcn, pre_alloc = -1, done = 0;
bool is_ext, is_bad = false;
bool dirty = false;
- u32 align;
+ u64 align;
struct MFT_REC *rec;
again:
--
2.40.0
Powered by blists - more mailing lists