syzbot


general protection fault in filp_close

Status: auto-obsoleted due to no activity on 2023/06/22 23:34
Reported-by: syzbot+a26c1f67043550e46c07@syzkaller.appspotmail.com
First crash: 619d, last: 619d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in filp_close fs 2 1532d 1546d 0/28 auto-closed as invalid on 2020/12/22 12:29
upstream KASAN: use-after-free Read in filp_close io-uring fs C done 17 689d 918d 22/28 fixed on 2023/02/24 13:50
android-54 KASAN: use-after-free Read in filp_close C 3 1217d 1422d 0/2 auto-obsoleted due to no activity on 2023/04/21 02:05
upstream KASAN: null-ptr-deref Read in filp_close (2) fs C 3 1239d 1348d 20/28 fixed on 2021/11/10 13:22

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc000000000f: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000078-0x000000000000007f]
CPU: 1 PID: 12415 Comm: syz-executor.4 Not tainted 5.10.161-syzkaller-00019-g416c4356f372 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
RIP: 0010:filp_close+0x8c/0x150 fs/open.c:1318
Code: 00 49 8d 5c 24 28 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 92 ef f8 ff 48 8b 1b 48 83 c3 78 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 75 ef f8 ff 48 8b 1b 48 85 db 74
RSP: 0018:ffffc900095a7e78 EFLAGS: 00010206
RAX: 000000000000000f RBX: 0000000000000078 RCX: 0000000000000000
RDX: ffff88816329bb40 RSI: 0100000000000000 RDI: 0000000000000000
RBP: ffffc900095a7ea0 R08: ffffffff81ae33ca R09: ffffed1022f01281
R10: ffffed1022f01281 R11: 1ffff11022f0127f R12: ffff8881178093c1
R13: dffffc0000000000 R14: ffff88810c52d6c0 R15: 0000000000000000
FS:  0000555555b7e400(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33224000 CR3: 00000001107ab000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __close_fd+0x224/0x290 fs/file.c:700
 __do_sys_close fs/open.c:1338 [inline]
 __se_sys_close fs/open.c:1336 [inline]
 __x64_sys_close+0x69/0xc0 fs/open.c:1336
 do_syscall_64+0x34/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x61/0xc6
RIP: 0033:0x7fa4c2334fab
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffc6a2e7020 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000010 RCX: 00007fa4c2334fab
RDX: ffffffffffffffb8 RSI: ffffffffffffffff RDI: 000000000000000f
RBP: 00007fa4c24a4980 R08: 0000000000000000 R09: 00007fa4c1ef7000
R10: 00007fa4c1efc890 R11: 0000000000000293 R12: 00000000002db143
R13: 00007ffc6a2e7120 R14: 00007fa4c24a2f80 R15: 0000000000000032
Modules linked in:
---[ end trace 1b3ce02005301fa9 ]---
RIP: 0010:filp_close+0x8c/0x150 fs/open.c:1318
Code: 00 49 8d 5c 24 28 48 89 d8 48 c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 92 ef f8 ff 48 8b 1b 48 83 c3 78 48 89 d8 48 c1 e8 03 <42> 80 3c 28 00 74 08 48 89 df e8 75 ef f8 ff 48 8b 1b 48 85 db 74
RSP: 0018:ffffc900095a7e78 EFLAGS: 00010206
RAX: 000000000000000f RBX: 0000000000000078 RCX: 0000000000000000
RDX: ffff88816329bb40 RSI: 0100000000000000 RDI: 0000000000000000
RBP: ffffc900095a7ea0 R08: ffffffff81ae33ca R09: ffffed1022f01281
R10: ffffed1022f01281 R11: 1ffff11022f0127f R12: ffff8881178093c1
R13: dffffc0000000000 R14: ffff88810c52d6c0 R15: 0000000000000000
FS:  0000555555b7e400(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe643d98000 CR3: 00000001107ab000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	00 49 8d             	add    %cl,-0x73(%rcx)
   3:	5c                   	pop    %rsp
   4:	24 28                	and    $0x28,%al
   6:	48 89 d8             	mov    %rbx,%rax
   9:	48 c1 e8 03          	shr    $0x3,%rax
   d:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1)
  12:	74 08                	je     0x1c
  14:	48 89 df             	mov    %rbx,%rdi
  17:	e8 92 ef f8 ff       	callq  0xfff8efae
  1c:	48 8b 1b             	mov    (%rbx),%rbx
  1f:	48 83 c3 78          	add    $0x78,%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 28 00       	cmpb   $0x0,(%rax,%r13,1) <-- trapping instruction
  2f:	74 08                	je     0x39
  31:	48 89 df             	mov    %rbx,%rdi
  34:	e8 75 ef f8 ff       	callq  0xfff8efae
  39:	48 8b 1b             	mov    (%rbx),%rbx
  3c:	48 85 db             	test   %rbx,%rbx
  3f:	74                   	.byte 0x74

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/24 23:29 android12-5.10-lts 416c4356f372 9700afae .config console log report info ci2-android-5-10 general protection fault in filp_close
* Struck through repros no longer work on HEAD.