Hello,
syzbot found the following issue on:
HEAD commit: 32c9cdbe383c Linux 6.1.60
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=137c91b3680000
kernel config:
https://syzkaller.appspot.com/x/.config?x=c022d971b9287d2b
dashboard link:
https://syzkaller.appspot.com/bug?extid=12fc39911136cf56517a
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/a490a5ba6b9d/disk-32c9cdbe.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/2c65d1af9e04/vmlinux-32c9cdbe.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/d262499bca4d/Image-32c9cdbe.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
[email protected]
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: CPU: 1 PID: 12173 at kernel/locking/mutex.c:582 __mutex_lock_common+0x1660/0x21a0 kernel/locking/mutex.c:582
Modules linked in:
CPU: 1 PID: 12173 Comm: syz-executor.3 Not tainted 6.1.60-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __mutex_lock_common+0x1660/0x21a0 kernel/locking/mutex.c:582
lr : __mutex_lock_common+0x1660/0x21a0 kernel/locking/mutex.c:582
sp : ffff80002bda7300
x29: ffff80002bda7490 x28: dfff800000000000 x27: 1ffff00003307efc
x26: ffff80001983f000 x25: ffff7000057b4e7c x24: 0000000000000000
x23: 0000000000000000 x22: ffff800008dcef20 x21: 0000000000000000
x20: 0000000000000000 x19: ffff0000d1c53028 x18: 1fffe000368b0776
x17: ffff80001580d000 x16: ffff80001213812c x15: ffff0001b4583bbc
x14: ffff0001b4583bb8 x13: 1fffe000368b0776 x12: 0000000000000001
x11: ff80800008050054 x10: 0000000040000002 x9 : 518bd157b7e05e00
x8 : 518bd157b7e05e00 x7 : 1fffe000368b0777 x6 : ffff80000827db78
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : ffff80002bda6e60 x1 : 0000000000000000 x0 : ffff80000827dc18
Call trace:
__mutex_lock_common+0x1660/0x21a0 kernel/locking/mutex.c:582
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3392 [inline]
open_last_lookups fs/namei.c:3482 [inline]
path_openat+0xd3c/0x2548 fs/namei.c:3712
do_filp_open+0x1bc/0x3cc fs/namei.c:3742
do_sys_openat2+0x128/0x3d8 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
irq event stamp: 74911
hardirqs last enabled at (74911): [<ffff80000897796c>] kasan_quarantine_put+0xdc/0x204 mm/kasan/quarantine.c:242
hardirqs last disabled at (74910): [<ffff80000897792c>] kasan_quarantine_put+0x9c/0x204 mm/kasan/quarantine.c:215
softirqs last enabled at (74846): [<ffff800008033064>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32
softirqs last disabled at (74844): [<ffff800008033030>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19
---[ end trace 0000000000000000 ]---
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/osq_lock.c:34:9
index 23 is out of range for type 'unsigned long[8]'
CPU: 0 PID: 12173 Comm: syz-executor.3 Tainted: G W 6.1.60-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282
decode_cpu kernel/locking/osq_lock.c:34 [inline]
osq_lock+0x460/0x480 kernel/locking/osq_lock.c:111
mutex_optimistic_spin+0x264/0x49c kernel/locking/mutex.c:460
__mutex_lock_common+0x1bc/0x21a0 kernel/locking/mutex.c:607
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3392 [inline]
open_last_lookups fs/namei.c:3482 [inline]
path_openat+0xd3c/0x2548 fs/namei.c:3712
do_filp_open+0x1bc/0x3cc fs/namei.c:3742
do_sys_openat2+0x128/0x3d8 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================
==================================================================
BUG: KASAN: use-after-free in osq_lock+0x154/0x480 kernel/locking/osq_lock.c:126
Write of size 8 at addr ffff00002d55d9a0 by task syz-executor.3/12173
CPU: 0 PID: 12173 Comm: syz-executor.3 Tainted: G W 6.1.60-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:284 [inline]
print_report+0x174/0x4c0 mm/kasan/report.c:395
kasan_report+0xd4/0x130 mm/kasan/report.c:495
__asan_report_store8_noabort+0x2c/0x38 mm/kasan/report_generic.c:356
osq_lock+0x154/0x480 kernel/locking/osq_lock.c:126
mutex_optimistic_spin+0x264/0x49c kernel/locking/mutex.c:460
__mutex_lock_common+0x1bc/0x21a0 kernel/locking/mutex.c:607
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3392 [inline]
open_last_lookups fs/namei.c:3482 [inline]
path_openat+0xd3c/0x2548 fs/namei.c:3712
do_filp_open+0x1bc/0x3cc fs/namei.c:3742
do_sys_openat2+0x128/0x3d8 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
The buggy address belongs to the physical page:
page:00000000587e1223 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6d55d
flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff)
raw: 01ffc00000000000 fffffc0000b55748 fffffc0000b55748 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff00002d55d880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff00002d55d900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff00002d55d980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff00002d55da00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff00002d55da80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:131:9
index 14021 is out of range for type 'unsigned long[8]'
CPU: 0 PID: 12173 Comm: syz-executor.3 Tainted: G B W 6.1.60-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
ubsan_epilogue lib/ubsan.c:151 [inline]
__ubsan_handle_out_of_bounds+0xfc/0x148 lib/ubsan.c:282
decode_tail kernel/locking/qspinlock.c:131 [inline]
queued_spin_lock_slowpath+0x9fc/0xe48 kernel/locking/qspinlock.c:471
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x330/0x358 kernel/locking/spinlock_debug.c:115
__raw_spin_lock include/linux/spinlock_api_smp.h:134 [inline]
_raw_spin_lock+0x5c/0x6c kernel/locking/spinlock.c:154
__mutex_lock_common+0x394/0x21a0 kernel/locking/mutex.c:617
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3392 [inline]
open_last_lookups fs/namei.c:3482 [inline]
path_openat+0xd3c/0x2548 fs/namei.c:3712
do_filp_open+0x1bc/0x3cc fs/namei.c:3742
do_sys_openat2+0x128/0x3d8 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1345
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
================================================================================
---
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
[email protected].
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup