syzbot


BUG: unable to handle kernel NULL pointer dereference in hdr_find_e

Status: fixed on 2023/09/08 14:10
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+7e4fb438ff50c7144804@syzkaller.appspotmail.com
Fix commit: 000a9a72efa4 fs/ntfs3: Check fields while reading
First crash: 622d, last: 526d
Fix bisection: fixed by (bisect log) :
commit 000a9a72efa4a9df289bab9c9e8ba1639c72e0d6
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Mon Oct 10 10:15:33 2022 +0000

  fs/ntfs3: Check fields while reading

  
Bug presence (3)
Date Name Commit Repro Result
2023/06/26 linux-6.1.y (ToT) e84a4e368abe C [report] BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/12 upstream (ToT) cc3c44c9fda2 C [report] KASAN: out-of-bounds Write in end_buffer_read_sync
2023/06/26 upstream (ToT) 6995e2de6891 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in hdr_find_e ntfs3 C done done 66 656d 798d 22/28 fixed on 2023/02/24 13:50
upstream BUG: unable to handle kernel NULL pointer dereference in hdr_find_e ntfs3 2 599d 613d 0/28 auto-obsoleted due to no activity on 2023/07/13 08:32
upstream BUG: unable to handle kernel NULL pointer dereference in hdr_find_e (2) ntfs3 C done 4 416d 488d 25/28 fixed on 2023/12/21 03:45
linux-5.15 BUG: unable to handle kernel NULL pointer dereference in hdr_find_e origin:lts-only C done 8 537d 622d 3/3 fixed on 2023/08/01 16:10

Sample crash report:
loop0: detected capacity change from 0 to 4096
ntfs3: loop0: Different NTFS' sector size (4096) and media sector size (512)
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 1ee49067 P4D 1ee49067 PUD 14a82067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3670 Comm: syz-executor160 Not tainted 6.1.28-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc90003b2f598 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: ffff88806ec2c288 RSI: 0000000000000000 RDI: ffffffff8b1e2ee0
RBP: ffffc90003b2f7d0 R08: ffff888028be4000 R09: ffffc90003b2f640
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff88806ec2c278 R14: dffffc0000000000 R15: 0000000000000138
FS:  00005555567c6300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000075302000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 hdr_find_e+0x33a/0x600 fs/ntfs3/index.c:712
 indx_find+0x313/0xb00 fs/ntfs3/index.c:1082
 dir_search_u+0x1b3/0x390 fs/ntfs3/dir.c:254
 ntfs_extend_init+0x191/0x530 fs/ntfs3/fsntfs.c:214
 ntfs_fill_super+0x4162/0x4500 fs/ntfs3/super.c:1243
 get_tree_bdev+0x3fe/0x620 fs/super.c:1346
 vfs_get_tree+0x88/0x270 fs/super.c:1553
 do_new_mount+0x28b/0xad0 fs/namespace.c:3040
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3568
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f51d3b45d2a
Code: 48 c7 c2 c0 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 a8 00 00 00 0f 1f 84 00 00 00 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:00007ffec2e05578 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00005555567c62c0 RCX: 00007f51d3b45d2a
RDX: 0000000020000080 RSI: 00000000200000c0 RDI: 00007ffec2e055c0
RBP: 0000000000000000 R08: 00007ffec2e05600 R09: 0000000000000000
R10: 0000000000004018 R11: 0000000000000286 R12: 0000000000000004
R13: 00007ffec2e05600 R14: 0000000000000003 R15: 00007ffec2e055c0
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0000000000000000 ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at 0xffffffffffffffd6.
RSP: 0018:ffffc90003b2f598 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: ffff88806ec2c288 RSI: 0000000000000000 RDI: ffffffff8b1e2ee0
RBP: ffffc90003b2f7d0 R08: ffff888028be4000 R09: ffffc90003b2f640
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff88806ec2c278 R14: dffffc0000000000 R15: 0000000000000138
FS:  00005555567c6300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000075302000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/15 06:47 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/04/01 20:00 linux-6.1.y 3b29299e5f60 f325deb0 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/06/14 16:21 linux-6.1.y ca87e77a2ef8 d2ee9228 .config console log report info ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/06/14 10:38 linux-6.1.y 2f3918bc53fb d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/06/11 03:33 linux-6.1.y 2f3918bc53fb 49519f06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/06/10 04:25 linux-6.1.y 2f3918bc53fb 9018a337 .config console log report info ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/06/10 03:09 linux-6.1.y 2f3918bc53fb 9018a337 .config console log report info ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/06/06 00:41 linux-6.1.y 76ba310227d2 a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/30 18:15 linux-6.1.y d2869ace6eeb df37c7f1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/26 05:22 linux-6.1.y a343b0dd87b4 b40ef614 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/17 08:15 linux-6.1.y bf4ad6fa4e53 11c89444 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/15 20:27 linux-6.1.y bf4ad6fa4e53 c4d362e7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/13 18:46 linux-6.1.y bf4ad6fa4e53 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/12 17:40 linux-6.1.y bf4ad6fa4e53 ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/11 06:33 linux-6.1.y ca48fc16c493 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/10 08:51 linux-6.1.y ca48fc16c493 1964022b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/09 03:57 linux-6.1.y ca48fc16c493 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/07 04:48 linux-6.1.y ca48fc16c493 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/04/20 04:40 linux-6.1.y 0102425ac76b a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/04/19 21:32 linux-6.1.y 0102425ac76b a219f34e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/04/17 16:21 linux-6.1.y 0102425ac76b c6ec7083 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/04/16 12:21 linux-6.1.y 0102425ac76b ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/03/22 05:26 linux-6.1.y 7eaef76fbc46 8b4eb097 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
* Struck through repros no longer work on HEAD.