syzbot


WARNING: kmalloc bug in ntfs_load_attr_list

Status: upstream: reported C repro on 2023/12/22 10:43
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+f987ceaddc6bcc334cde@syzkaller.appspotmail.com
First crash: 127d, last: 74d
Cause bisection: introduced by (bisect log) :
commit fc471e39e38fea6677017cbdd6d928088a59fc67
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Fri Jun 30 12:12:58 2023 +0000

  fs/ntfs3: Use kvmalloc instead of kmalloc(... __GFP_NOWARN)

Crash: WARNING: kmalloc bug in ntfs_load_attr_list (log)
Repro: C syz .config
  
Fix bisection: the issue occurs on the latest tested release (bisect log)
  
Discussions (3)
Title Replies (including bot) Last reply
Re: [PATCH 5/8] fs/ntfs3: Use kvmalloc instead of kmalloc(... __GFP_NOWARN) 2 (2) 2023/12/23 16:56
[PATCH] fs/ntfs3: fix warning in ntfs_load_attr_list 2 (2) 2023/12/23 13:38
[syzbot] [ntfs3?] WARNING: kmalloc bug in ntfs_load_attr_list 1 (3) 2023/12/23 04:05
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 WARNING: kmalloc bug in ntfs_load_attr_list origin:lts-only C 1 8d10h 8d16h 0/3 upstream: reported C repro on 2024/04/18 16:36
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/04/20 00:09 23m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci OK log
2024/01/21 02:42 57m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2024/01/07 01:44 18m retest repro upstream report log
2023/12/23 03:47 16m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9a6b294ab496 OK log

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3: loop0: Different NTFS sector size (4096) and media sector size (512).
------------[ cut here ]------------
WARNING: CPU: 1 PID: 5058 at mm/util.c:632 kvmalloc_node+0x176/0x180 mm/util.c:632
Modules linked in:
CPU: 1 PID: 5058 Comm: syz-executor408 Not tainted 6.7.0-rc6-syzkaller-00168-g9a6b294ab496 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:kvmalloc_node+0x176/0x180 mm/util.c:632
Code: c3 44 89 fe 81 e6 00 20 00 00 31 ff e8 e3 d4 c1 ff 41 81 e7 00 20 00 00 74 0a e8 25 d1 c1 ff e9 3f ff ff ff e8 1b d1 c1 ff 90 <0f> 0b 90 e9 31 ff ff ff 66 90 f3 0f 1e fa 41 56 53 49 89 f6 48 89
RSP: 0018:ffffc90003c67588 EFLAGS: 00010293
RAX: ffffffff81cc9945 RBX: 0000000100000000 RCX: ffff8880246a1dc0
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffff81cc992d R09: 00000000ffffffff
R10: ffffc90003c67420 R11: fffff5200078ce89 R12: ffff888075aa1620
R13: ffff88807c8fc0a8 R14: 00000000ffffffff R15: 0000000000000000
FS:  000055555591b380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdedfd4000 CR3: 000000001c753000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 kvmalloc include/linux/slab.h:738 [inline]
 ntfs_load_attr_list+0x123/0x510 fs/ntfs3/attrlist.c:56
 ntfs_read_mft fs/ntfs3/inode.c:190 [inline]
 ntfs_iget5+0x10ad/0x3b70 fs/ntfs3/inode.c:534
 ntfs_loadlog_and_replay+0x17d/0x530 fs/ntfs3/fsntfs.c:297
 ntfs_fill_super+0x2cf1/0x4c60 fs/ntfs3/super.c:1268
 get_tree_bdev+0x416/0x5b0 fs/super.c:1598
 vfs_get_tree+0x8c/0x2a0 fs/super.c:1771
 do_new_mount+0x28f/0xae0 fs/namespace.c:3337
 do_mount fs/namespace.c:3677 [inline]
 __do_sys_mount fs/namespace.c:3886 [inline]
 __se_sys_mount+0x2d9/0x3c0 fs/namespace.c:3863
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f32f0f78d4a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdedfd3188 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffdedfd3190 RCX: 00007f32f0f78d4a
RDX: 0000000020000040 RSI: 00000000200000c0 RDI: 00007ffdedfd3190
RBP: 0000000000000004 R08: 00007ffdedfd31d0 R09: 000000000001f238
R10: 0000000000000005 R11: 0000000000000286 R12: 00007ffdedfd31d0
R13: 0000000000000003 R14: 0000000000200000 R15: 0000000000000001
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/22 00:46 upstream 9a6b294ab496 4f9530a3 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs WARNING: kmalloc bug in ntfs_load_attr_list
2023/12/23 23:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci aafe7ad77b91 fb427a07 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 WARNING: kmalloc bug in ntfs_load_attr_list
2023/12/22 00:32 upstream 9a6b294ab496 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs WARNING: kmalloc bug in ntfs_load_attr_list
2024/02/12 22:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci f735966ee23c 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING: kmalloc bug in ntfs_load_attr_list
* Struck through repros no longer work on HEAD.