syzbot


BUG: unable to handle kernel paging request in mi_enum_attr

Status: fixed on 2023/02/24 13:50
Subsystems: ntfs3
[Documentation on labels]
Reported-by: syzbot+28207acc70bbf3d85b74@syzkaller.appspotmail.com
Fix commit: 0e8235d28f3a fs/ntfs3: Check fields while reading
First crash: 608d, last: 478d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 0e8235d28f3a0e9eda9f02ff67ee566d5f42b66b
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Mon Oct 10 10:15:33 2022 +0000

  fs/ntfs3: Check fields while reading

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] BUG: unable to handle kernel paging request in mi_enum_attr 1 (4) 2023/02/06 10:09
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in mi_enum_attr ntfs3 C unreliable 1 21d 85d 0/26 upstream: reported C repro on 2024/02/01 15:17

Sample crash report:
loop0: detected capacity change from 0 to 8192
ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512)
==================================================================
BUG: KASAN: use-after-free in mi_enum_attr+0x605/0x640 fs/ntfs3/record.c:235
Read of size 4 at addr ffff888178628047 by task syz-executor601/5068

CPU: 0 PID: 5068 Comm: syz-executor601 Not tainted 6.1.0-syzkaller-10971-g041fae9c105a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xd1/0x138 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:306 [inline]
 print_report+0x15e/0x45d mm/kasan/report.c:417
 kasan_report+0xbf/0x1f0 mm/kasan/report.c:517
 mi_enum_attr+0x605/0x640 fs/ntfs3/record.c:235
 ni_enum_attr_ex+0x31d/0x400 fs/ntfs3/frecord.c:259
 ntfs_read_mft fs/ntfs3/inode.c:114 [inline]
 ntfs_iget5+0xac0/0x3280 fs/ntfs3/inode.c:501
 ntfs_fill_super+0x1ff5/0x3860 fs/ntfs3/super.c:1045
 get_tree_bdev+0x444/0x760 fs/super.c:1282
 vfs_get_tree+0x8d/0x2f0 fs/super.c:1489
 do_new_mount fs/namespace.c:3145 [inline]
 path_mount+0x132a/0x1e20 fs/namespace.c:3475
 do_mount fs/namespace.c:3488 [inline]
 __do_sys_mount fs/namespace.c:3697 [inline]
 __se_sys_mount fs/namespace.c:3674 [inline]
 __x64_sys_mount+0x283/0x300 fs/namespace.c:3674
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fe53e57093a
Code: 83 c4 08 5b 5d c3 66 2e 0f 1f 84 00 00 00 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc3f7e30f8 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe53e57093a
RDX: 0000000020020bc0 RSI: 0000000020020c00 RDI: 00007ffc3f7e3110
RBP: 00007ffc3f7e3110 R08: 00007ffc3f7e3150 R09: 0000000000020b9f
R10: 0000000000018882 R11: 0000000000000286 R12: 0000000000000004
R13: 000055555704a2c0 R14: 0000000000018882 R15: 00007ffc3f7e3150
 </TASK>

The buggy address belongs to the physical page:
page:ffffea0005e18a00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x178628
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0005e18a08 ffffea0005e18a08 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner info is not present (never set?)

Memory state around the buggy address:
 ffff888178627f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888178627f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888178628000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                           ^
 ffff888178628080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888178628100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/12/15 20:13 upstream 041fae9c105a 6f9c033e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root KASAN: use-after-free Read in mi_enum_attr
2022/12/12 22:46 upstream 830b3c68c1fb 67be1ae7 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root KASAN: use-after-free Read in mi_enum_attr
2022/11/28 22:27 upstream b7b275e60bcd 247de55b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: use-after-free Read in mi_enum_attr
2022/11/27 15:56 upstream faf68e3523c2 f4470a7b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: use-after-free Read in mi_enum_attr
2022/10/31 19:31 upstream b229b6ca5abb 2a71366b .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root KASAN: use-after-free Read in mi_enum_attr
2022/10/22 11:42 upstream 440b7895c990 c0b80a55 .config strace log report syz C [disk image] [vmlinux] [mounted in repro] ci2-upstream-fs KASAN: use-after-free Read in mi_enum_attr
2022/12/18 11:30 upstream f9ff5644bcc0 05494336 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs KASAN: use-after-free Read in mi_enum_attr
2023/01/05 07:53 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 1dac8c7a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/31 12:13 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 ab32d508 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/29 15:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 44712fbc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/26 23:38 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/26 08:51 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/26 06:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/23 02:24 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/23 02:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 9da18ae8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/12/15 21:54 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a5541c0811a0 6f9c033e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/08/28 00:37 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a41a877bc12d 07177916 .config console log report info ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in mi_enum_attr
2022/10/22 11:18 upstream 440b7895c990 c0b80a55 .config console log report info [disk image] [vmlinux] ci2-upstream-fs KASAN: use-after-free Read in mi_enum_attr
* Struck through repros no longer work on HEAD.