syzbot


general protection fault in inherit_task_group

Status: fixed on 2023/12/05 18:06
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+f71fb831af7a7dffea27@syzkaller.appspotmail.com
Fix commit: 21b07a2e6095 perf/core: Fix potential NULL deref
First crash: 405d, last: 400d
Fix bisection: fixed by (bisect log) :
commit 21b07a2e6095ea57356527d20fe5bf2a5adbac3d
Author: Peter Zijlstra <peterz@infradead.org>
Date: Tue Oct 24 09:42:21 2023 +0000

  perf/core: Fix potential NULL deref

  
Bug presence (1)
Date Name Commit Repro Result
2023/10/27 upstream (ToT) 888cf78c29e2 C [report] general protection fault in inherit_task_group
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-54 general protection fault in inherit_task_group C 22 27d 293d 0/2 upstream: reported C repro on 2024/02/16 22:46
upstream general protection fault in inherit_task_group perf C done done 4 403d 401d 25/28 fixed on 2023/12/21 03:45
linux-6.1 general protection fault in inherit_task_group origin:upstream missing-backport C inconclusive 3 314d 405d 0/3 upstream: reported C repro on 2023/10/28 05:24
android-6-1 general protection fault in inherit_task_group origin:downstream C 1 152d 293d 0/2 auto-obsoleted due to no activity on 2024/10/14 11:46
android-5-10 general protection fault in inherit_task_group C 24 7d10h 293d 0/2 upstream: reported C repro on 2024/02/16 23:02
android-5-15 general protection fault in inherit_task_group origin:downstream C 8 6d13h 293d 0/2 upstream: reported C repro on 2024/02/16 23:09

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000011: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000088-0x000000000000008f]
CPU: 0 PID: 3690 Comm: syz-executor141 Not tainted 5.15.137-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023
RIP: 0010:inherit_group kernel/events/core.c:13280 [inline]
RIP: 0010:inherit_task_group+0x276/0x710 kernel/events/core.c:13327
Code: 81 c3 8c 00 00 00 48 89 d8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 3a 04 00 00 8b 1b 49 81 c6 8c 00 00 00 4c 89 f0 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 3a 04 00 00 41 89 1e e9 98 fe ff ff e8
RSP: 0018:ffffc9000359f8f0 EFLAGS: 00010207
RAX: 0000000000000011 RBX: 0000000000000000 RCX: ffff888019369dc0
RDX: 0000000000000000 RSI: ffffffff8a8b0be0 RDI: ffff88813fe66470
RBP: ffff88813fe663f0 R08: dffffc0000000000 R09: fffffbfff1f79a3d
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88807e348000 R14: 000000000000008c R15: ffff88813fe663f0
FS:  00007f922dea96c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000048 CR3: 000000001a3c4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 perf_event_init_context kernel/events/core.c:13396 [inline]
 perf_event_init_task+0x355/0x7a0 kernel/events/core.c:13449
 copy_process+0x1570/0x3ef0 kernel/fork.c:2180
 kernel_clone+0x210/0x960 kernel/fork.c:2604
 __do_sys_clone kernel/fork.c:2721 [inline]
 __se_sys_clone kernel/fork.c:2705 [inline]
 __x64_sys_clone+0x23f/0x290 kernel/fork.c:2705
 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:0x7f922df0dc39
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1a 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f922dea9228 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007f922df98418 RCX: 00007f922df0dc39
RDX: 0000000000000000 RSI: 0000000001000000 RDI: 00000000c0920400
RBP: 00007f922df98410 R08: 0000000000000000 R09: 00007f922dea96c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f922df64648
R13: 00007f922df9841c R14: 00000000c0920400 R15: 00007ffcff04e118
 </TASK>
Modules linked in:
---[ end trace 380093cce355fc41 ]---
RIP: 0010:inherit_group kernel/events/core.c:13280 [inline]
RIP: 0010:inherit_task_group+0x276/0x710 kernel/events/core.c:13327
Code: 81 c3 8c 00 00 00 48 89 d8 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 3a 04 00 00 8b 1b 49 81 c6 8c 00 00 00 4c 89 f0 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 3a 04 00 00 41 89 1e e9 98 fe ff ff e8
RSP: 0018:ffffc9000359f8f0 EFLAGS: 00010207
RAX: 0000000000000011 RBX: 0000000000000000 RCX: ffff888019369dc0
RDX: 0000000000000000 RSI: ffffffff8a8b0be0 RDI: ffff88813fe66470
RBP: ffff88813fe663f0 R08: dffffc0000000000 R09: fffffbfff1f79a3d
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88807e348000 R14: 000000000000008c R15: ffff88813fe663f0
FS:  00007f922dea96c0(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcff1a29b0 CR3: 000000001a3c4000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	81 c3 8c 00 00 00    	add    $0x8c,%ebx
   6:	48 89 d8             	mov    %rbx,%rax
   9:	48 c1 e8 03          	shr    $0x3,%rax
   d:	42 0f b6 04 20       	movzbl (%rax,%r12,1),%eax
  12:	84 c0                	test   %al,%al
  14:	0f 85 3a 04 00 00    	jne    0x454
  1a:	8b 1b                	mov    (%rbx),%ebx
  1c:	49 81 c6 8c 00 00 00 	add    $0x8c,%r14
  23:	4c 89 f0             	mov    %r14,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 0f b6 04 20       	movzbl (%rax,%r12,1),%eax <-- trapping instruction
  2f:	84 c0                	test   %al,%al
  31:	0f 85 3a 04 00 00    	jne    0x471
  37:	41 89 1e             	mov    %ebx,(%r14)
  3a:	e9 98 fe ff ff       	jmp    0xfffffed7
  3f:	e8                   	.byte 0xe8

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/10/27 19:34 linux-5.15.y 12952a23a5da 3c418d72 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-perf general protection fault in inherit_task_group
2023/10/27 18:31 linux-5.15.y 12952a23a5da 3c418d72 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-perf general protection fault in inherit_task_group
2023/10/28 03:14 linux-5.15.y 12952a23a5da 3c418d72 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-perf general protection fault in inherit_task_group
2023/11/02 03:53 linux-5.15.y 12952a23a5da 69904c9f .config console log report info ci2-linux-5-15-kasan-perf general protection fault in inherit_task_group
* Struck through repros no longer work on HEAD.