syzbot


kernel BUG in __phys_addr

Status: fixed on 2023/07/17 13:09
Reported-by: syzbot+f9abe8ca9de083ef3c5b@syzkaller.appspotmail.com
Fix commit: a8eaa9a06add fs/ntfs3: Validate MFT flags before replaying logs
First crash: 562d, last: 531d
Fix bisection: fixed by (bisect log) :
commit a8eaa9a06addbd9cb0238cb1c729921ecbb6504c
Author: Edward Lo <edward.lo@ambergroup.io>
Date: Sat Nov 5 15:39:44 2022 +0000

  fs/ntfs3: Validate MFT flags before replaying logs

  
Bug presence (1)
Date Name Commit Repro Result
2023/06/09 upstream (ToT) 33f2b5785a2b C Didn't crash
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in __phys_addr (2) bcachefs C error done 54 201d 494d 0/28 auto-obsoleted due to no activity on 2024/07/20 07:06
upstream kernel BUG at arch/x86/mm/physaddr.c:LINE! (6) raid 90 1079d 1575d 0/28 auto-closed as invalid on 2022/04/07 07:37
linux-4.14 kernel BUG at arch/x86/mm/physaddr.c:LINE! C inconclusive 23 1335d 1792d 0/1 upstream: reported C repro on 2019/12/26 02:01
linux-6.1 kernel BUG in __phys_addr (2) origin:lts-only C done 12 207d 208d 0/3 upstream: reported C repro on 2024/04/27 00:09
linux-4.19 kernel BUG at arch/x86/mm/physaddr.c:LINE! (3) 76 815d 1590d 0/1 auto-obsoleted due to no activity on 2022/12/26 22:17
upstream kernel BUG in __phys_addr net 1 579d 575d 0/28 auto-obsoleted due to no activity on 2023/06/21 10:32
linux-5.15 kernel BUG in __phys_addr origin:lts-only C done 3 134d 207d 0/3 upstream: reported C repro on 2024/04/27 21:08

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 ]------------
kernel BUG at arch/x86/mm/physaddr.c:28!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3538 Comm: syz-executor182 Not tainted 6.1.32-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
RIP: 0010:__phys_addr+0x151/0x170 arch/x86/mm/physaddr.c:28
Code: 15 ac a2 00 e9 41 ff ff ff e8 0b 65 4c 00 48 c7 c7 40 d4 d9 8c 4c 89 f6 4c 89 fa e8 59 fd 21 03 e9 49 ff ff ff e8 ef 64 4c 00 <0f> 0b e8 e8 64 4c 00 0f 0b e8 e1 64 4c 00 0f 0b 66 2e 0f 1f 84 00
RSP: 0018:ffffc900039ff8b8 EFLAGS: 00010293
RAX: ffffffff813d7081 RBX: dead4ead80000000 RCX: ffff8880221c3b80
RDX: 0000000000000000 RSI: dead4ead80000000 RDI: deadc62d00000000
RBP: dffffc0000000000 R08: ffffffff813d6f77 R09: ffff8880738f9850
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880738f9898
R13: ffffffff8b1e7430 R14: deadc62d00000000 R15: dffffc0000000000
FS:  0000555555b7f300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd9a9f5000 CR3: 0000000023984000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 virt_to_folio include/linux/mm.h:896 [inline]
 kfree+0x42/0x190 mm/slab_common.c:999
 run_close fs/ntfs3/ntfs_fs.h:931 [inline]
 indx_clear+0x3a/0x80 fs/ntfs3/index.c:821
 ni_clear+0x205/0x3d0 fs/ntfs3/frecord.c:121
 evict+0x2a4/0x620 fs/inode.c:664
 ntfs_loadlog_and_replay+0x2d9/0x530 fs/ntfs3/fsntfs.c:301
 ntfs_fill_super+0x2505/0x4500 fs/ntfs3/super.c:1018
 get_tree_bdev+0x3fe/0x620 fs/super.c:1346
 vfs_get_tree+0x88/0x270 fs/super.c:1553
 do_new_mount+0x28b/0xae0 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:0x7f38b3c8eaba
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:00007ffd9a9f4a48 EFLAGS: 00000286 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f38b3c8eaba
RDX: 0000000020002380 RSI: 0000000020000180 RDI: 00007ffd9a9f4a50
RBP: 00007ffd9a9f4a50 R08: 00007ffd9a9f4a90 R09: 000000000001f22c
R10: 0000000000000013 R11: 0000000000000286 R12: 0000000000000004
R13: 0000555555b7f2c0 R14: 00007ffd9a9f4a90 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__phys_addr+0x151/0x170 arch/x86/mm/physaddr.c:28
Code: 15 ac a2 00 e9 41 ff ff ff e8 0b 65 4c 00 48 c7 c7 40 d4 d9 8c 4c 89 f6 4c 89 fa e8 59 fd 21 03 e9 49 ff ff ff e8 ef 64 4c 00 <0f> 0b e8 e8 64 4c 00 0f 0b e8 e1 64 4c 00 0f 0b 66 2e 0f 1f 84 00
RSP: 0018:ffffc900039ff8b8 EFLAGS: 00010293
RAX: ffffffff813d7081 RBX: dead4ead80000000 RCX: ffff8880221c3b80
RDX: 0000000000000000 RSI: dead4ead80000000 RDI: deadc62d00000000
RBP: dffffc0000000000 R08: ffffffff813d6f77 R09: ffff8880738f9850
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880738f9898
R13: ffffffff8b1e7430 R14: deadc62d00000000 R15: dffffc0000000000
FS:  0000555555b7f300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffd9a9f5000 CR3: 0000000023984000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/09 07:35 linux-6.1.y 76ba310227d2 058b3a5a .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan kernel BUG in __phys_addr
2023/05/09 10:08 linux-6.1.y ca48fc16c493 c7a5e2a0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan kernel BUG in __phys_addr
* Struck through repros no longer work on HEAD.