syzbot


general protection fault in pm_qos_update_target
Status: upstream: reported syz repro on 2021/05/17 11:37
Reported-by: syzbot+f7d9295d2565ee819d21@syzkaller.appspotmail.com
Fix commit: 3c3201f8c7bb ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls
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-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-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 380d, last: 67d

Cause bisection: the issue happens on the oldest tested release (bisect log)
Crash: BUG: unable to handle kernel paging request in pm_qos_update_target (log)
Repro: syz .config

Fix bisection: fixed by (bisect log) :
commit 3c3201f8c7bb77eb53b08a3ca8d9a4ddc500b4c0
Author: Takashi Iwai <tiwai@suse.de>
Date: Tue Mar 22 17:07:19 2022 +0000

  ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls

similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 BUG: unable to handle kernel paging request in pm_qos_update_target C error 3 209d 775d 0/1 upstream: reported C repro on 2020/04/13 09:59

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 9989 Comm: syz-executor.5 Not tainted 5.13.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__list_del_entry_valid+0x67/0x100 lib/list_debug.c:51
Code: 4c 89 f7 e8 9b a7 c6 fd 48 ba 00 01 00 00 00 00 ad de 49 8b 1e 48 39 d3 74 53 48 83 c2 22 49 39 d7 74 5d 4c 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 ff e8 6a a7 c6 fd 49 8b 17 4c 39 f2 75
RSP: 0018:ffffc9000bacf590 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8880190e54c0
RDX: dead000000000122 RSI: ffffffff8cdeada0 RDI: ffff88802920b860
RBP: dffffc0000000000 R08: 0000000000000005 R09: ffffffff816335ff
R10: 0000000000000003 R11: ffff8880190e54c0 R12: dffffc0000000000
R13: 1ffff11005241709 R14: ffff88802920b858 R15: 0000000000000000
FS:  00007f133b30a700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff68face5c CR3: 0000000018b54000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 __list_del_entry include/linux/list.h:132 [inline]
 list_del_init include/linux/list.h:204 [inline]
 plist_del+0x2e3/0x420 lib/plist.c:130
 pm_qos_update_target+0x20c/0x5c0 kernel/power/qos.c:114
 cpu_latency_qos_apply kernel/power/qos.c:247 [inline]
 cpu_latency_qos_remove_request+0x94/0xd0 kernel/power/qos.c:328
 snd_pcm_hw_free sound/core/pcm_native.c:842 [inline]
 snd_pcm_common_ioctl+0x62e5/0x9760 sound/core/pcm_native.c:3219
 snd_pcm_ioctl+0x86/0xa0 sound/core/pcm_native.c:3302
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:1055
 do_syscall_64+0x3f/0xb0 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665d9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f133b30a188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665d9
RDX: 0000000000000000 RSI: 0000000000004112 RDI: 0000000000000004
RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60
R13: 00007ffd68562d1f R14: 00007f133b30a300 R15: 0000000000022000
Modules linked in:
---[ end trace bc5d821852e61222 ]---
RIP: 0010:__list_del_entry_valid+0x67/0x100 lib/list_debug.c:51
Code: 4c 89 f7 e8 9b a7 c6 fd 48 ba 00 01 00 00 00 00 ad de 49 8b 1e 48 39 d3 74 53 48 83 c2 22 49 39 d7 74 5d 4c 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 08 4c 89 ff e8 6a a7 c6 fd 49 8b 17 4c 39 f2 75
RSP: 0018:ffffc9000bacf590 EFLAGS: 00010046
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8880190e54c0
RDX: dead000000000122 RSI: ffffffff8cdeada0 RDI: ffff88802920b860
RBP: dffffc0000000000 R08: 0000000000000005 R09: ffffffff816335ff
R10: 0000000000000003 R11: ffff8880190e54c0 R12: dffffc0000000000
R13: 1ffff11005241709 R14: ffff88802920b858 R15: 0000000000000000
FS:  00007f133b30a700(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff68face5c CR3: 0000000018b54000 CR4: 00000000001506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2021/05/13 07:26 upstream dbb5afad100a ed7d41c5 .config log report syz general protection fault in pm_qos_update_target