[v5.15] WARNING in reiserfs_lookup (2)

0 views
Skip to first unread message

syzbot

unread,
Mar 30, 2024, 11:45:31 PMMar 30
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9465fef4ae35 Linux 5.15.153
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=126016b5180000
kernel config: https://syzkaller.appspot.com/x/.config?x=74ff83133fa97f6c
dashboard link: https://syzkaller.appspot.com/bug?extid=00b28ba809541778dca3
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/3c82fda40b43/disk-9465fef4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ec13893dc103/vmlinux-9465fef4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7b44910e5283/Image-9465fef4.gz.xz

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

DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: CPU: 1 PID: 8721 at kernel/locking/mutex.c:575 __mutex_lock_common+0x1614/0x2154 kernel/locking/mutex.c:575
Modules linked in:
CPU: 1 PID: 8721 Comm: syz-executor.1 Not tainted 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __mutex_lock_common+0x1614/0x2154 kernel/locking/mutex.c:575
lr : __mutex_lock_common+0x1614/0x2154 kernel/locking/mutex.c:575
sp : ffff800020b572c0
x29: ffff800020b57450 x28: dfff800000000000 x27: 1ffff000030807a4
x26: ffff800018403000 x25: ffff70000416ae74 x24: 0000000000000000
x23: 0000000000000000 x22: ffff800008d057f8 x21: 0000000000000000
x20: 0000000000000000 x19: ffff0000d91d4028 x18: 0000000000000001
x17: 0000000000000002 x16: ffff80001197d2b4 x15: 00000000ffffffff
x14: ffff0000d29e8000 x13: 0000000000000001 x12: 0000000000040000
x11: 0000000000005e67 x10: ffff80001d109000 x9 : dffc6753fcccc500
x8 : dffc6753fcccc500 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff800020b56a38 x4 : ffff8000149ef7a0 x3 : ffff80000854e6c0
x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000028
Call trace:
__mutex_lock_common+0x1614/0x2154 kernel/locking/mutex.c:575
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3440 [inline]
open_last_lookups fs/namei.c:3532 [inline]
path_openat+0xc9c/0x26f0 fs/namei.c:3739
do_filp_open+0x1a8/0x3b4 fs/namei.c:3769
do_sys_openat2+0x128/0x3d8 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_openat fs/open.c:1243 [inline]
__se_sys_openat fs/open.c:1238 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1238
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
irq event stamp: 2347
hardirqs last enabled at (2347): [<ffff8000088cca58>] kasan_quarantine_put+0xdc/0x204 mm/kasan/quarantine.c:231
hardirqs last disabled at (2346): [<ffff8000088cca18>] kasan_quarantine_put+0x9c/0x204 mm/kasan/quarantine.c:204
softirqs last enabled at (2310): [<ffff8000080310b4>] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:31
softirqs last disabled at (2308): [<ffff800008031080>] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:18
---[ end trace 049a4ce04d5f538d ]---
================================================================================
UBSAN: array-index-out-of-bounds in kernel/locking/qspinlock.c:130:9
index 15681 is out of range for type 'unsigned long[8]'
CPU: 1 PID: 8721 Comm: syz-executor.1 Tainted: G W 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__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+0x108/0x15c lib/ubsan.c:282
decode_tail kernel/locking/qspinlock.c:130 [inline]
queued_spin_lock_slowpath+0x854/0x938 kernel/locking/qspinlock.c:468
queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
do_raw_spin_lock+0x334/0x35c kernel/locking/spinlock_debug.c:115
__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline]
_raw_spin_lock+0xb8/0x10c kernel/locking/spinlock.c:154
__mutex_lock_common+0x380/0x2154 kernel/locking/mutex.c:608
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3440 [inline]
open_last_lookups fs/namei.c:3532 [inline]
path_openat+0xc9c/0x26f0 fs/namei.c:3739
do_filp_open+0x1a8/0x3b4 fs/namei.c:3769
do_sys_openat2+0x128/0x3d8 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_openat fs/open.c:1243 [inline]
__se_sys_openat fs/open.c:1238 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1238
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584
================================================================================
==================================================================
BUG: KASAN: use-after-free in queued_spin_lock_slowpath+0x364/0x938 kernel/locking/qspinlock.c:471
Write of size 8 at addr ffff0000262e5360 by task syz-executor.1/8721

CPU: 1 PID: 8721 Comm: syz-executor.1 Tainted: G W 5.15.153-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
print_address_description+0x7c/0x3f0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x174/0x1e4 mm/kasan/report.c:451
__asan_report_store8_noabort+0x44/0x50 mm/kasan/report_generic.c:314
queued_spin_lock_slowpath+0x364/0x938 kernel/locking/qspinlock.c:471
queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
do_raw_spin_lock+0x334/0x35c kernel/locking/spinlock_debug.c:115
__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline]
_raw_spin_lock+0xb8/0x10c kernel/locking/spinlock.c:154
__mutex_lock_common+0x380/0x2154 kernel/locking/mutex.c:608
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743
reiserfs_write_lock+0x7c/0xe8 fs/reiserfs/lock.c:27
reiserfs_lookup+0x130/0x3c4 fs/reiserfs/namei.c:364
lookup_open fs/namei.c:3440 [inline]
open_last_lookups fs/namei.c:3532 [inline]
path_openat+0xc9c/0x26f0 fs/namei.c:3739
do_filp_open+0x1a8/0x3b4 fs/namei.c:3769
do_sys_openat2+0x128/0x3d8 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_openat fs/open.c:1243 [inline]
__se_sys_openat fs/open.c:1238 [inline]
__arm64_sys_openat+0x1f0/0x240 fs/open.c:1238
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

The buggy address belongs to the page:
page:0000000098491063 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x662e5
flags: 0x1ffc00000000000(node=0|zone=0|lastcpupid=0x7ff)
raw: 01ffc00000000000 fffffc000098b948 fffffc000098b948 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff0000262e5200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff0000262e5280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff0000262e5300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
^
ffff0000262e5380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
ffff0000262e5400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


---
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 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
Reply all
Reply to author
Forward
0 new messages