syzbot


general protection fault in reweight_entity

Status: fixed on 2023/02/24 13:50
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+8d9571494fc49db5aca1@syzkaller.appspotmail.com
Fix commit: 13765de8148f sched/fair: Fix fault in reweight_entity
First crash: 1023d, last: 965d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 13765de8148f71fa795e0a6607de37c49ea5915a
Author: Tadeusz Struk <tadeusz.struk@linaro.org>
Date: Thu Feb 3 16:18:46 2022 +0000

  sched/fair: Fix fault in reweight_entity

  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] general protection fault in reweight_entity 1 (3) 2022/05/12 13:00
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 general protection fault in reweight_entity C done 2 965d 1023d 1/2 fixed on 2022/02/23 11:01
upstream KASAN: slab-use-after-free Read in reweight_entity kernel C inconclusive error 626 232d 355d 0/28 closed as invalid on 2024/09/06 10:38
Last patch testing requests (1)
Created Duration User Patch Repo Result
2022/02/18 21:15 13m tadeusz.struk@linaro.org https://android.googlesource.com/kernel/common android12-5.10 OK

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000014: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x00000000000000a0-0x00000000000000a7]
CPU: 1 PID: 957 Comm: syz-executor328 Not tainted 5.17.0-rc3-syzkaller-00316-gb81b1829e7e3 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:dequeue_load_avg kernel/sched/fair.c:3031 [inline]
RIP: 0010:reweight_entity+0x11c/0x570 kernel/sched/fair.c:3053
Code: 03 80 3c 11 00 0f 85 03 04 00 00 48 8d bd a0 00 00 00 4c 8b a3 e0 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 c8 03 00 00 48 8b 95 a0 00 00 00 4c 29 e2 0f 82
RSP: 0018:ffffc9000cfdfd40 EFLAGS: 00010006
RAX: 0000000000044000 RBX: ffff888078601d80 RCX: 0000000000000014
RDX: dffffc0000000000 RSI: ffff888078601d80 RDI: 00000000000000a0
RBP: 0000000000000000 R08: ffff88807860210c R09: ffff888017b91d00
R10: ffff888078601f90 R11: ffff888078601d70 R12: 0000000000000400
R13: ffff888078601db8 R14: 1ffff920019fbfbe R15: ffff8880b9c3a998
FS:  00007f13920d2700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f139213d360 CR3: 000000007f988000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 reweight_task+0x94/0x160 kernel/sched/fair.c:3078
 set_load_weight kernel/sched/core.c:1236 [inline]
 set_user_nice.part.0+0x837/0x1120 kernel/sched/core.c:6924
 set_one_prio+0x241/0x340 kernel/sys.c:198
 __do_sys_setpriority+0x302/0xb80 kernel/sys.c:239
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f1392128bb9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 31 18 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:00007f13920d2218 EFLAGS: 00000246 ORIG_RAX: 000000000000008d
RAX: ffffffffffffffda RBX: 00007f13921aa3c8 RCX: 00007f1392128bb9
RDX: 0000000000000006 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 00007f13921aa3c0 R08: 00007f13920d2700 R09: 0000000000000000
R10: 00007f13920d2700 R11: 0000000000000246 R12: 00007f13921aa3cc
R13: 00007ffe7181c4cf R14: 00007f13920d2300 R15: 0000000000022000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:dequeue_load_avg kernel/sched/fair.c:3031 [inline]
RIP: 0010:reweight_entity+0x11c/0x570 kernel/sched/fair.c:3053
Code: 03 80 3c 11 00 0f 85 03 04 00 00 48 8d bd a0 00 00 00 4c 8b a3 e0 00 00 00 48 ba 00 00 00 00 00 fc ff df 48 89 f9 48 c1 e9 03 <80> 3c 11 00 0f 85 c8 03 00 00 48 8b 95 a0 00 00 00 4c 29 e2 0f 82
RSP: 0018:ffffc9000cfdfd40 EFLAGS: 00010006
RAX: 0000000000044000 RBX: ffff888078601d80 RCX: 0000000000000014
RDX: dffffc0000000000 RSI: ffff888078601d80 RDI: 00000000000000a0
RBP: 0000000000000000 R08: ffff88807860210c R09: ffff888017b91d00
R10: ffff888078601f90 R11: ffff888078601d70 R12: 0000000000000400
R13: ffff888078601db8 R14: 1ffff920019fbfbe R15: ffff8880b9c3a998
FS:  00007f13920d2700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f139213d360 CR3: 000000007f988000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	03 80 3c 11 00 0f    	add    0xf00113c(%rax),%eax
   6:	85 03                	test   %eax,(%rbx)
   8:	04 00                	add    $0x0,%al
   a:	00 48 8d             	add    %cl,-0x73(%rax)
   d:	bd a0 00 00 00       	mov    $0xa0,%ebp
  12:	4c 8b a3 e0 00 00 00 	mov    0xe0(%rbx),%r12
  19:	48 ba 00 00 00 00 00 	movabs $0xdffffc0000000000,%rdx
  20:	fc ff df
  23:	48 89 f9             	mov    %rdi,%rcx
  26:	48 c1 e9 03          	shr    $0x3,%rcx
* 2a:	80 3c 11 00          	cmpb   $0x0,(%rcx,%rdx,1) <-- trapping instruction
  2e:	0f 85 c8 03 00 00    	jne    0x3fc
  34:	48 8b 95 a0 00 00 00 	mov    0xa0(%rbp),%rdx
  3b:	4c 29 e2             	sub    %r12,%rdx
  3e:	0f                   	.byte 0xf
  3f:	82                   	.byte 0x82

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/02/13 16:47 upstream b81b1829e7e3 8b9ca619 .config console log report syz C ci-upstream-kasan-gce general protection fault in reweight_entity
2022/01/23 01:39 upstream 0809edbae347 214351e1 .config console log report syz C ci-upstream-kasan-gce general protection fault in reweight_entity
2021/12/17 18:43 upstream 6441998e2e37 44068e19 .config console log report syz C ci-upstream-kasan-gce general protection fault in reweight_entity
2021/12/17 16:51 linux-next fbf252e09678 44068e19 .config console log report syz C ci-upstream-linux-next-kasan-gce-root general protection fault in reweight_entity
2022/01/12 23:25 upstream f079ab01b560 44d1319a .config console log report info ci-upstream-kasan-gce-root general protection fault in reweight_entity
2022/01/07 18:57 upstream ddec8ed2d490 2ca0d385 .config console log report info ci-upstream-kasan-gce-root general protection fault in reweight_entity
2022/01/06 11:44 upstream 75acfdb6fd92 6acc789a .config console log report info ci-upstream-kasan-gce-root general protection fault in reweight_entity
2022/01/30 23:46 upstream 24f4db1f3a27 495e00c5 .config console log report info ci-upstream-kasan-gce-386 general protection fault in reweight_entity
2022/02/07 14:00 linux-next ef6b35306dd8 a7dab638 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in reweight_entity
2021/12/17 16:11 linux-next fbf252e09678 44068e19 .config console log report info ci-upstream-linux-next-kasan-gce-root general protection fault in reweight_entity
* Struck through repros no longer work on HEAD.