On Sun, Mar 09, 2025 at 03:56:36PM +0100, Miguel GarcĂa wrote:
From: Konstantin Komarov almaz.alexandrovich@paragon-software.com
commit 91a4b1ee78cb ("fs/ntfs3: Fix shift-out-of-bounds in ntfs_fill_super")
This patch is a backport and fixes an UBSAN warning about shift-out-of-bounds in ntfs_fill_super() function of the NTFS3 driver. The original code incorrectly calculated MFT record size, causing undefined behavior when performing bit shifts with values that exceed type limits.
The fix has been verified by executing the syzkaller reproducer test case. After applying this patch, the system successfully handles the test case without kernel panic or UBSAN warnings.
Bug: https://syzkaller.appspot.com/bug?extid=010986becd65dbf9464b Reported-by: syzbot+010986becd65dbf9464b@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Konstantin Komarov almaz.alexandrovich@paragon-software.com Signed-off-by: Miguel Garcia Roman miguelgarciaroman8@gmail.com (cherry picked from commit 91a4b1ee78cb100b19b70f077c247f211110348f)
fs/ntfs3/ntfs_fs.h | 2 ++ fs/ntfs3/super.c | 63 +++++++++++++++++++++++++++++++++++----------- 2 files changed, 50 insertions(+), 15 deletions(-)
We need a 6.1.y version of this first. Please submit that first and then resend this for older kernels.
thanks,
greg k-h