syzbot


general protection fault in ext4_acquire_dquot

Status: fixed on 2023/10/12 12:47
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+e633c79ceaecbf479854@syzkaller.appspotmail.com
Fix commit: 6a4e3363792e quota: Properly disable quotas when add_dquot_ref() fails
First crash: 346d, last: 303d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH AUTOSEL 5.10 09/22] quota: Properly disable quotas when add_dquot_ref() fails 1 (1) 2023/07/24 01:24
[PATCH AUTOSEL 5.15 07/23] quota: Properly disable quotas when add_dquot_ref() fails 1 (1) 2023/07/24 01:23
[PATCH AUTOSEL 6.1 18/41] quota: Properly disable quotas when add_dquot_ref() fails 1 (1) 2023/07/24 01:20
[PATCH AUTOSEL 6.4 26/58] quota: Properly disable quotas when add_dquot_ref() fails 1 (1) 2023/07/24 01:12
[PATCH 1/2] quota: fix null-ptr-deref in ext4_acquire_dquot() 5 (5) 2023/06/05 14:08
[PATCH v2 1/2] quota: Properly disable quotas when add_dquot_ref() fails 1 (1) 2023/06/05 14:07
[syzbot] [ext4?] general protection fault in ext4_acquire_dquot 0 (1) 2023/05/12 13:15
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: unable to handle kernel paging request in ext4_acquire_dquot origin:lts-only C done 2 304d 340d 3/3 fixed on 2023/08/04 15:57
android-6-1 general protection fault in ext4_acquire_dquot origin:lts C done done 1 206d 330d 0/2 auto-obsoleted due to no activity on 2024/01/03 10:28
android-5-15 general protection fault in ext4_acquire_dquot C done done 2 298d 330d 2/2 fixed on 2023/09/06 18:13
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/05/12 19:26 24m tytso@mit.edu https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git test OK log

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 0 PID: 8633 Comm: syz-executor222 Not tainted 6.4.0-rc7-syzkaller-00014-g692b7dc87ca6 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:ext4_acquire_dquot+0xc5/0x3d0 fs/ext4/super.c:6810
Code: c1 ea 03 80 3c 02 00 0f 85 0e 03 00 00 4f 8b bc e5 30 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 7f 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 dd 02 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffffc9000e7e76c0 EFLAGS: 00010216
RAX: dffffc0000000000 RBX: ffffffff8a645500 RCX: 0000000000000000
RDX: 0000000000000005 RSI: ffffffff823ae5ca RDI: 0000000000000028
RBP: ffff8880749eea80 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88801ef20000 R14: ffff8880749eeaa0 R15: 0000000000000000
FS:  00007f5047d30700(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f50501b6988 CR3: 0000000017397000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 dqget+0x67d/0x1080 fs/quota/dquot.c:914
 __dquot_initialize+0x560/0xbe0 fs/quota/dquot.c:1492
 dquot_initialize fs/quota/dquot.c:1550 [inline]
 dquot_file_open fs/quota/dquot.c:2181 [inline]
 dquot_file_open+0x90/0xb0 fs/quota/dquot.c:2175
 ext4_file_open fs/ext4/file.c:904 [inline]
 ext4_file_open+0x35d/0xbf0 fs/ext4/file.c:873
 do_dentry_open+0x6cc/0x13f0 fs/open.c:920
 do_open fs/namei.c:3636 [inline]
 path_openat+0x1baa/0x2750 fs/namei.c:3791
 do_filp_open+0x1ba/0x410 fs/namei.c:3818
 do_sys_openat2+0x16d/0x4c0 fs/open.c:1356
 do_sys_open fs/open.c:1372 [inline]
 __do_sys_openat fs/open.c:1388 [inline]
 __se_sys_openat fs/open.c:1383 [inline]
 __x64_sys_openat+0x143/0x1f0 fs/open.c:1383
 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:0x7f5050165819
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 71 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5047d302f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f50501ea7b0 RCX: 00007f5050165819
RDX: 000000000000275a RSI: 0000000020000100 RDI: 00000000ffffff9c
RBP: 00007f50501b758c R08: 00007f5047d30700 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 756f726776737973
R13: 636f6c6c61646c6f R14: 0030656c69662f2e R15: 00007f50501ea7b8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ext4_acquire_dquot+0xc5/0x3d0 fs/ext4/super.c:6810
Code: c1 ea 03 80 3c 02 00 0f 85 0e 03 00 00 4f 8b bc e5 30 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8d 7f 28 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 dd 02 00 00 48 b8 00 00 00 00 00 fc ff df 4d 8b
RSP: 0018:ffffc9000e7e76c0 EFLAGS: 00010216
RAX: dffffc0000000000 RBX: ffffffff8a645500 RCX: 0000000000000000
RDX: 0000000000000005 RSI: ffffffff823ae5ca RDI: 0000000000000028
RBP: ffff8880749eea80 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88801ef20000 R14: ffff8880749eeaa0 R15: 0000000000000000
FS:  00007f5047d30700(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5050122890 CR3: 0000000017397000 CR4: 0000000000350ee0
----------------
Code disassembly (best guess):
   0:	c1 ea 03             	shr    $0x3,%edx
   3:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   7:	0f 85 0e 03 00 00    	jne    0x31b
   d:	4f 8b bc e5 30 02 00 	mov    0x230(%r13,%r12,8),%r15
  14:	00
  15:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1c:	fc ff df
  1f:	49 8d 7f 28          	lea    0x28(%r15),%rdi
  23:	48 89 fa             	mov    %rdi,%rdx
  26:	48 c1 ea 03          	shr    $0x3,%rdx
* 2a:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  2e:	0f 85 dd 02 00 00    	jne    0x311
  34:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  3b:	fc ff df
  3e:	4d                   	rex.WRB
  3f:	8b                   	.byte 0x8b

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/20 18:36 upstream 692b7dc87ca6 09ffe269 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root general protection fault in ext4_acquire_dquot
2023/06/20 02:18 upstream 45a3e24f65e9 d521bc56 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root general protection fault in ext4_acquire_dquot
2023/05/09 18:07 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 14f8db1c0f9a 30aa2a7e .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 BUG: unable to handle kernel paging request in ext4_acquire_dquot
2023/05/08 13:05 upstream ac9a78681b92 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs general protection fault in ext4_acquire_dquot
* Struck through repros no longer work on HEAD.