[syzbot] [mm?] [fs?] general protection fault in rwsem_mark_wake

0 views
Skip to first unread message

syzbot

unread,
Mar 17, 2026, 1:33:27 PM (17 hours ago) Mar 17
to b...@alien8.de, dave....@linux.intel.com, h...@zytor.com, linux-...@vger.kernel.org, linux-...@vger.kernel.org, linu...@kvack.org, lu...@kernel.org, mi...@redhat.com, syzkall...@googlegroups.com, tg...@kernel.org, x...@kernel.org
Hello,

syzbot found the following issue on:

HEAD commit: b84a0ebe421c Add linux-next specific files for 20260313
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=159fdd52580000
kernel config: https://syzkaller.appspot.com/x/.config?x=e7280ad1f68b2dce
dashboard link: https://syzkaller.appspot.com/bug?extid=334054c6077f3a88ab3a
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15ee4216580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12b478da580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/09145161a8a9/disk-b84a0ebe.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b64c254e474c/vmlinux-b84a0ebe.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a7c33f5f7f45/bzImage-b84a0ebe.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+334054...@syzkaller.appspotmail.com

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
CPU: 0 UID: 0 PID: 6080 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
RIP: 0010:rwsem_mark_wake+0xfa/0x7c0 kernel/locking/rwsem.c:445
Code: 01 00 74 08 4c 89 f7 e8 e4 c2 8d 00 4c 89 74 24 10 4d 8b 26 4d 8d 74 24 18 4c 89 f0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 75 06 00 00 41 83 3e 00 74 64 4c 89 ef be
RSP: 0018:ffffc900021cf9a0 EFLAGS: 00010006
RAX: 0000000000000003 RBX: 0000000000000000 RCX: dffffc0000000000
RDX: 1ffff92000439f40 RSI: ffffffff8e4a660a RDI: ffffffff8c4a5c80
RBP: ffffc900021cfaa0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000439f50 R12: 0000000000000000
R13: ffff88807da38f50 R14: 0000000000000018 R15: ffffc900021cfc20
FS: 00005555890a6500(0000) GS:ffff888124de0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000605000 CR3: 000000007a580000 CR4: 00000000003526f0
Call Trace:
<TASK>
rwsem_del_wake_waiter+0x25d/0x2e0 kernel/locking/rwsem.c:612
rwsem_down_write_slowpath+0xa6f/0x1080 kernel/locking/rwsem.c:1234
__down_write_common kernel/locking/rwsem.c:1347 [inline]
__down_write_killable kernel/locking/rwsem.c:1361 [inline]
down_write_killable+0x1eb/0x240 kernel/locking/rwsem.c:1639
mmap_write_lock_killable include/linux/mmap_lock.h:554 [inline]
vm_mmap_pgoff+0x234/0x4f0 mm/util.c:579
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f6cd219c502
Code: 4f 01 00 0f 1f 44 00 00 41 f7 c1 ff 0f 00 00 75 27 55 89 cd 53 48 89 fb 48 85 ff 74 3b 41 89 ea 48 89 df b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 6e 5b 5d c3 0f 1f 00 48 c7 c0 e8 ff ff ff 64
RSP: 002b:00007ffdcb93dea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f6cd219c502
RDX: 0000000000000000 RSI: 0000000000021000 RDI: 0000000000000000
RBP: 0000000000020022 R08: 00000000ffffffff R09: 0000000000000000
R10: 0000000000020022 R11: 0000000000000246 R12: 00007ffdcb93e010
R13: ffffffffffffffc0 R14: 0000000000001000 R15: 0000000000000000
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:rwsem_mark_wake+0xfa/0x7c0 kernel/locking/rwsem.c:445
Code: 01 00 74 08 4c 89 f7 e8 e4 c2 8d 00 4c 89 74 24 10 4d 8b 26 4d 8d 74 24 18 4c 89 f0 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <0f> b6 04 08 84 c0 0f 85 75 06 00 00 41 83 3e 00 74 64 4c 89 ef be
RSP: 0018:ffffc900021cf9a0 EFLAGS: 00010006
RAX: 0000000000000003 RBX: 0000000000000000 RCX: dffffc0000000000
RDX: 1ffff92000439f40 RSI: ffffffff8e4a660a RDI: ffffffff8c4a5c80
RBP: ffffc900021cfaa0 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000439f50 R12: 0000000000000000
R13: ffff88807da38f50 R14: 0000000000000018 R15: ffffc900021cfc20
FS: 00005555890a6500(0000) GS:ffff888124de0000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000605000 CR3: 000000007a580000 CR4: 00000000003526f0
----------------
Code disassembly (best guess):
0: 01 00 add %eax,(%rax)
2: 74 08 je 0xc
4: 4c 89 f7 mov %r14,%rdi
7: e8 e4 c2 8d 00 call 0x8dc2f0
c: 4c 89 74 24 10 mov %r14,0x10(%rsp)
11: 4d 8b 26 mov (%r14),%r12
14: 4d 8d 74 24 18 lea 0x18(%r12),%r14
19: 4c 89 f0 mov %r14,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 0f b6 04 08 movzbl (%rax,%rcx,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 75 06 00 00 jne 0x6ab
36: 41 83 3e 00 cmpl $0x0,(%r14)
3a: 74 64 je 0xa0
3c: 4c 89 ef mov %r13,%rdi
3f: be .byte 0xbe


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

Hillf Danton

unread,
Mar 17, 2026, 11:08:51 PM (8 hours ago) Mar 17
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
> Date: Tue, 17 Mar 2026 10:33:25 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: b84a0ebe421c Add linux-next specific files for 20260313
> git tree: linux-next
> console output: https://syzkaller.appspot.com/x/log.txt?x=159fdd52580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=e7280ad1f68b2dce
> dashboard link: https://syzkaller.appspot.com/bug?extid=334054c6077f3a88ab3a
> compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15ee4216580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12b478da580000

#syz test

--- x/kernel/locking/rwsem.c
+++ y/kernel/locking/rwsem.c
@@ -365,12 +365,11 @@ enum rwsem_wake_type {
#define MAX_READERS_WAKEUP 0x100

static inline
-bool __rwsem_del_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter)
+void __rwsem_del_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter)
__must_hold(&sem->wait_lock)
{
if (list_empty(&waiter->list)) {
sem->first_waiter = NULL;
- return true;
}

if (sem->first_waiter == waiter) {
@@ -378,8 +377,6 @@ bool __rwsem_del_waiter(struct rw_semaph
struct rwsem_waiter, list);
}
list_del(&waiter->list);
-
- return false;
}

/*
@@ -394,7 +391,8 @@ static inline bool
rwsem_del_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter)
{
lockdep_assert_held(&sem->wait_lock);
- if (__rwsem_del_waiter(sem, waiter))
+ __rwsem_del_waiter(sem, waiter);
+ if (rwsem_is_contended(sem))
return true;
atomic_long_andnot(RWSEM_FLAG_HANDOFF | RWSEM_FLAG_WAITERS, &sem->count);
return false;
--

syzbot

unread,
Mar 17, 2026, 11:35:05 PM (7 hours ago) Mar 17
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+334054...@syzkaller.appspotmail.com
Tested-by: syzbot+334054...@syzkaller.appspotmail.com

Tested on:

commit: 8e5a478b Add linux-next specific files for 20260317
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=13cebd52580000
kernel config: https://syzkaller.appspot.com/x/.config?x=1d7d59e3bf573a4f
dashboard link: https://syzkaller.appspot.com/bug?extid=334054c6077f3a88ab3a
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
patch: https://syzkaller.appspot.com/x/patch.diff?x=1505f8da580000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages