syzbot


general protection fault in ext4_fill_super

Status: upstream: reported C repro on 2022/01/17 08:23
Reported-by: syzbot+138c9e58e3cb22eae3b4@syzkaller.appspotmail.com
Fix commit: 7c268d4ce2d3 ext4: fix potential NULL pointer dereference in ext4_fill_super()
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 391d, last: 171d

Cause bisection: introduced by (bisect log) :
commit cebe85d570cf84804e848332d6721bc9e5300e07
Author: Lukas Czerner <lczerner@redhat.com>
Date: Wed Oct 27 14:18:56 2021 +0000

  ext4: switch to the new mount api

Crash: general protection fault in ext4_fill_super (log)
Repro: C syz .config
Last patch testing requests:
Created Duration User Patch Repo Result
2022/02/06 06:56 13m phind.uet@gmail.com linux-next OK

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000012: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097]
CPU: 0 PID: 3603 Comm: syz-executor131 Not tainted 5.17.0-rc2-syzkaller-00316-g0457e5153e0e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_fill_super+0x247/0x770 fs/ext4/super.c:5550
Code: 3b 4c 89 6c 24 20 49 8d bd a8 06 00 00 be 2f 00 00 00 ba 21 00 00 00 e8 87 5a d9 01 4d 8d af 90 00 00 00 4d 89 ec 49 c1 ec 03 <41> 80 3c 2c 00 74 08 4c 89 ef e8 ca 7d 96 ff 49 c7 45 00 01 00 00
RSP: 0018:ffffc9000284fbe8 EFLAGS: 00010206
RAX: ffff8880217dc6ac RBX: ffff88801c4048f0 RCX: ffff88807d4b9d00
RDX: 0000000000000000 RSI: 000000000000002f RDI: 0000000000000035
RBP: dffffc0000000000 R08: ffffffff84142d6e R09: fffffbfff197f79f
R10: fffffbfff197f79f R11: 0000000000000000 R12: 0000000000000012
R13: 0000000000000090 R14: ffff888014784f00 R15: 0000000000000000
FS:  00005555563943c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000001c361000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 get_tree_bdev+0x406/0x630 fs/super.c:1292
 vfs_get_tree+0x86/0x270 fs/super.c:1497
 do_new_mount fs/namespace.c:2994 [inline]
 path_mount+0x1986/0x2c30 fs/namespace.c:3324
 do_mount fs/namespace.c:3337 [inline]
 __do_sys_mount fs/namespace.c:3545 [inline]
 __se_sys_mount+0x308/0x3c0 fs/namespace.c:3522
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fb3d4cbca49
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 15 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007ffc0c4f4df8 EFLAGS: 00000246
 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fb3d4cbca49
RDX: 0000000020000100 RSI: 00000000200000c0 RDI: 0000000020000080
RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000003636
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc0c4f4e00
R13: 00007ffc0c4f4ea0 R14: 00007ffc0c4f4e60 R15: 0000000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ext4_fill_super+0x247/0x770 fs/ext4/super.c:5550
Code: 3b 4c 89 6c 24 20 49 8d bd a8 06 00 00 be 2f 00 00 00 ba 21 00 00 00 e8 87 5a d9 01 4d 8d af 90 00 00 00 4d 89 ec 49 c1 ec 03 <41> 80 3c 2c 00 74 08 4c 89 ef e8 ca 7d 96 ff 49 c7 45 00 01 00 00
RSP: 0018:ffffc9000284fbe8 EFLAGS: 00010206

RAX: ffff8880217dc6ac RBX: ffff88801c4048f0 RCX: ffff88807d4b9d00
RDX: 0000000000000000 RSI: 000000000000002f RDI: 0000000000000035
----------------
Code disassembly (best guess):
   0:	3b 4c 89 6c          	cmp    0x6c(%rcx,%rcx,4),%ecx
   4:	24 20                	and    $0x20,%al
   6:	49 8d bd a8 06 00 00 	lea    0x6a8(%r13),%rdi
   d:	be 2f 00 00 00       	mov    $0x2f,%esi
  12:	ba 21 00 00 00       	mov    $0x21,%edx
  17:	e8 87 5a d9 01       	callq  0x1d95aa3
  1c:	4d 8d af 90 00 00 00 	lea    0x90(%r15),%r13
  23:	4d 89 ec             	mov    %r13,%r12
  26:	49 c1 ec 03          	shr    $0x3,%r12
* 2a:	41 80 3c 2c 00       	cmpb   $0x0,(%r12,%rbp,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	4c 89 ef             	mov    %r13,%rdi
  34:	e8 ca 7d 96 ff       	callq  0xff967e03
  39:	49                   	rex.WB
  3a:	c7                   	.byte 0xc7
  3b:	45 00 01             	add    %r8b,(%r9)

Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-kasan-gce-smack-root 2022/02/05 19:50 upstream 0457e5153e0e a7dab638 .config console log report syz C general protection fault in ext4_fill_super
ci-upstream-kasan-gce-smack-root 2022/02/05 19:32 upstream 0457e5153e0e a7dab638 .config console log report info general protection fault in ext4_fill_super
ci-upstream-kasan-gce-smack-root 2022/01/12 15:05 upstream daadb3bd0e8d 44d1319a .config console log report info general protection fault in ext4_fill_super
ci-qemu-upstream-386 2022/01/19 17:28 upstream 1d1df41c5a33 0620189b .config console log report info general protection fault in ext4_fill_super
ci-qemu2-riscv64 2022/08/20 17:34 git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes 0966d385830d 26a13b38 .config console log report info KASAN: null-ptr-deref Write in ext4_fill_super
* Struck through repros no longer work on HEAD.