syzbot


BUG: unable to handle kernel NULL pointer dereference in hdr_find_e

Status: fixed on 2023/08/01 16:10
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+1380620f8290560156eb@syzkaller.appspotmail.com
Fix commit: 333feb7ba84f fs/ntfs3: Check fields while reading
First crash: 610d, last: 525d
Fix bisection: fixed by (bisect log) :
commit 333feb7ba84f69f9b423422417aaac54fd9e7c84
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 (2)
Date Name Commit Repro Result
2023/05/16 linux-5.15.y (ToT) b0ece631f84a C [report] BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/16 upstream (ToT) f1fcbaa18b28 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 BUG: unable to handle kernel NULL pointer dereference in hdr_find_e origin:upstream missing-backport C done 23 514d 610d 3/3 fixed on 2023/09/08 14:10
upstream KASAN: use-after-free Read in hdr_find_e ntfs3 C done done 66 643d 786d 22/28 fixed on 2023/02/24 13:50
upstream BUG: unable to handle kernel NULL pointer dereference in hdr_find_e ntfs3 2 587d 600d 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 404d 476d 25/28 fixed on 2023/12/21 03:45
Fix bisection attempts (3)
Created Duration User Patch Repo Result
2023/07/30 15:48 3h30m bisect fix linux-5.15.y OK (1) job log
2023/06/15 08:59 28m bisect fix linux-5.15.y OK (0) job log log
2023/05/01 14:11 33m bisect fix linux-5.15.y OK (0) job log log

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 1d393067 P4D 1d393067 PUD 723c3067 PMD 0 
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 3673 Comm: syz-executor253 Not tainted 5.15.103-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002d6f598 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: ffff888076870288 RSI: 0000000000000000 RDI: ffffffff8abacc00
RBP: ffffc90002d6f7d0 R08: ffff888076924000 R09: ffffc90002d6f640
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000138
R13: dffffc0000000000 R14: ffff888076870278 R15: 0000000000000000
FS:  00005555561ac300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000723c9000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 hdr_find_e+0x2f6/0x570 fs/ntfs3/index.c:708
 indx_find+0x313/0xb00 fs/ntfs3/index.c:1077
 dir_search_u+0x1b3/0x390 fs/ntfs3/dir.c:254
 ntfs_extend_init+0x191/0x530 fs/ntfs3/fsntfs.c:214
 ntfs_fill_super+0x40b9/0x4450 fs/ntfs3/super.c:1238
 get_tree_bdev+0x3fe/0x620 fs/super.c:1294
 vfs_get_tree+0x88/0x270 fs/super.c:1499
 do_new_mount+0x28b/0xad0 fs/namespace.c:2994
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3522
 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+0x61/0xcb
RIP: 0033:0x7fc136898d2a
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:00007ffcddaebb18 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00005555561ac2c0 RCX: 00007fc136898d2a
RDX: 0000000020000080 RSI: 00000000200000c0 RDI: 00007ffcddaebb60
RBP: 0000000000000000 R08: 00007ffcddaebba0 R09: 0000000000000000
R10: 0000000000004018 R11: 0000000000000286 R12: 0000000000000004
R13: 00007ffcddaebba0 R14: 0000000000000003 R15: 00007ffcddaebb60
 </TASK>
Modules linked in:
CR2: 0000000000000000
---[ end trace 0cdc7ed0fd67e5cb ]---
RIP: 0010:0x0
Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
RSP: 0018:ffffc90002d6f598 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: ffff888076870288 RSI: 0000000000000000 RDI: ffffffff8abacc00
RBP: ffffc90002d6f7d0 R08: ffff888076924000 R09: ffffc90002d6f640
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000138
R13: dffffc0000000000 R14: ffff888076870278 R15: 0000000000000000
FS:  00005555561ac300(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000000723c9000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/22 10:13 linux-5.15.y 8020ae3c051d 8b4eb097 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/04/01 12:48 linux-5.15.y c957cbb87315 f325deb0 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/12 18:54 linux-5.15.y b0ece631f84a ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/11 09:37 linux-5.15.y 8a7f2a5c5aa1 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/10 20:03 linux-5.15.y 8a7f2a5c5aa1 14b12a99 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/09 06:14 linux-5.15.y 8a7f2a5c5aa1 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/05/06 11:47 linux-5.15.y 8a7f2a5c5aa1 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
2023/03/22 07:13 linux-5.15.y 8020ae3c051d 8b4eb097 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan BUG: unable to handle kernel NULL pointer dereference in hdr_find_e
* Struck through repros no longer work on HEAD.