Hello,
syzbot found the following issue on:
HEAD commit: 42616e0f09fb Linux 6.1.15
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=15cc3a24c80000
kernel config:
https://syzkaller.appspot.com/x/.config?x=650737f7e9682672
dashboard link:
https://syzkaller.appspot.com/bug?extid=252e96bafe4c37a60f97
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/f10713d1fd0f/disk-42616e0f.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/5a1307bb774e/vmlinux-42616e0f.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/388238a30fe4/Image-42616e0f.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+252e96...@syzkaller.appspotmail.com
XFS (loop3): Filesystem has been shut down due to log error (0x2).
XFS (loop3): Please unmount the filesystem and rectify the problem(s).
==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x114/0x764c kernel/locking/lockdep.c:4925
Read of size 8 at addr ffff0000c92eda58 by task kworker/1:1H/51
CPU: 1 PID: 51 Comm: kworker/1:1H Not tainted 6.1.15-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: xfs-log/loop3 xlog_ioend_work
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+0x178/0x4e0 mm/kasan/report.c:395
kasan_report+0xd4/0x130 mm/kasan/report.c:495
__asan_report_load8_noabort+0x2c/0x38 mm/kasan/report_generic.c:351
__lock_acquire+0x114/0x764c kernel/locking/lockdep.c:4925
lock_acquire+0x2f8/0x8dc kernel/locking/lockdep.c:5668
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x54/0x6c kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:350 [inline]
xfs_trans_committed_bulk+0xe4/0x73c fs/xfs/xfs_trans.c:773
xlog_cil_committed+0x210/0xef8 fs/xfs/xfs_log_cil.c:795
xlog_cil_process_committed+0x11c/0x174 fs/xfs/xfs_log_cil.c:823
xlog_state_shutdown_callbacks+0x23c/0x324 fs/xfs/xfs_log.c:538
xlog_force_shutdown+0x29c/0x350 fs/xfs/xfs_log.c:3821
xlog_ioend_work+0xa8/0xf8 fs/xfs/xfs_log.c:1402
process_one_work+0x848/0x16b4 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x24c/0x2d4 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
Allocated by task 6593:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0xac/0xc4 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:211 [inline]
__do_kmalloc_node mm/slab_common.c:955 [inline]
__kmalloc+0xd8/0x1c4 mm/slab_common.c:968
kmalloc include/linux/slab.h:558 [inline]
kmem_alloc+0x278/0x690 fs/xfs/kmem.c:20
kmem_zalloc fs/xfs/kmem.h:69 [inline]
xfs_trans_ail_init+0x2c/0x220 fs/xfs/xfs_trans_ail.c:902
xfs_log_mount+0x294/0x6e0 fs/xfs/xfs_log.c:721
xfs_mountfs+0xa04/0x18fc fs/xfs/xfs_mount.c:805
xfs_fs_fill_super+0xd38/0xf50 fs/xfs/xfs_super.c:1666
get_tree_bdev+0x360/0x54c fs/super.c:1324
xfs_fs_get_tree+0x28/0x38 fs/xfs/xfs_super.c:1713
vfs_get_tree+0x90/0x274 fs/super.c:1531
do_new_mount+0x25c/0x8c8 fs/namespace.c:3040
path_mount+0x590/0xe58 fs/namespace.c:3370
do_mount fs/namespace.c:3383 [inline]
__do_sys_mount fs/namespace.c:3591 [inline]
__se_sys_mount fs/namespace.c:3568 [inline]
__arm64_sys_mount+0x45c/0x594 fs/namespace.c:3568
__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:581
Freed by task 4350:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
____kasan_slab_free+0x144/0x20c mm/kasan/common.c:236
__kasan_slab_free+0x18/0x28 mm/kasan/common.c:244
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x2c0/0x500 mm/slub.c:3674
kfree+0x104/0x268 mm/slab_common.c:1007
kvfree+0x40/0x50 mm/util.c:627
kmem_free fs/xfs/kmem.h:62 [inline]
xfs_trans_ail_destroy+0x60/0x70 fs/xfs/xfs_trans_ail.c:933
xfs_log_unmount+0x54/0xbc fs/xfs/xfs_log.c:1116
xfs_unmountfs+0x130/0x1d0 fs/xfs/xfs_mount.c:1081
xfs_fs_put_super+0x78/0x260 fs/xfs/xfs_super.c:1115
generic_shutdown_super+0x130/0x2f0 fs/super.c:492
kill_block_super+0x70/0xdc fs/super.c:1428
deactivate_locked_super+0xac/0x124 fs/super.c:332
deactivate_super+0xf0/0x110 fs/super.c:363
cleanup_mnt+0x394/0x41c fs/namespace.c:1186
__cleanup_mnt+0x20/0x30 fs/namespace.c:1193
task_work_run+0x240/0x2f0 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x2144/0x3470 arch/arm64/kernel/signal.c:1132
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581
The buggy address belongs to the object at ffff0000c92eda00
which belongs to the cache kmalloc-256 of size 256
The buggy address is located 88 bytes inside of
256-byte region [ffff0000c92eda00, ffff0000c92edb00)
The buggy address belongs to the physical page:
page:00000000f5b34839 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000c92ed400 pfn:0x1092ec
head:00000000f5b34839 order:1 compound_mapcount:0 compound_pincount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 fffffc0003397200 dead000000000003 ffff0000c0002480
raw: ffff0000c92ed400 000000008010000e 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff0000c92ed900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff0000c92ed980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000c92eda00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff0000c92eda80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff0000c92edb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
XFS (): xfs_trans_ail_delete: attempting to delete a log item that is not in the AIL
Unable to handle kernel paging request at virtual address e0cc707b13de1cfb
KASAN: maybe wild-memory-access in range [0x066783d89ef0e7d8-0x066783d89ef0e7df]
Mem abort info:
ESR = 0x0000000096000004
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x04: level 0 translation fault
Data abort info:
ISV = 0, ISS = 0x00000004
CM = 0, WnR = 0
[e0cc707b13de1cfb] address between user and kernel address ranges
Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 51 Comm: kworker/1:1H Tainted: G B 6.1.15-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: xfs-log/loop3 xlog_ioend_work
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : xfs_log_force+0x174/0xbcc fs/xfs/xfs_log.c:3204
lr : xfs_log_force+0x14c/0xbcc fs/xfs/xfs_log.c:3204
sp : ffff80001b257310
x29: ffff80001b257310 x28: 0000000000000001 x27: ffff800015741108
x26: dfff800000000000 x25: ffff80001568f008 x24: 066803d70000174a
x23: 066783d89ef0e7da x22: 0000000000000000 x21: ffff800009d0dfcc
x20: ffff0001043dcae0 x19: 0000000000000001 x18: 1fffe000368b3d76
x17: 6874206d65746920 x16: ffff80001219ff00 x15: 0000000000000000
x14: 0000000000000000 x13: 0000000000000001 x12: 0000000000000001
x11: ff80800009d07c40 x10: 0000000000000000 x9 : ffff800009d07c40
x8 : 00ccf07b13de1cfb x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff80001b256bb8 x4 : ffff800015823840 x3 : ffff800009d07c08
x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000008
Call trace:
xfs_log_force+0x174/0xbcc fs/xfs/xfs_log.c:3204
xlog_force_shutdown+0xac/0x350 fs/xfs/xfs_log.c:3765
xfs_trans_ail_delete+0x124/0x2b0 fs/xfs/xfs_trans_ail.c:885
xfs_buf_item_done+0x58/0x94 fs/xfs/xfs_buf_item.c:1042
xfs_buf_ioend+0x3c8/0x90c fs/xfs/xfs_buf.c:1326
xfs_buf_ioend_fail+0x78/0x90 fs/xfs/xfs_buf.c:1397
xfs_buf_item_unpin+0x2e8/0xc18 fs/xfs/xfs_buf_item.c:549
xfs_trans_committed_bulk+0x2d8/0x73c fs/xfs/xfs_trans.c:806
xlog_cil_committed+0x210/0xef8 fs/xfs/xfs_log_cil.c:795
xlog_cil_process_committed+0x11c/0x174 fs/xfs/xfs_log_cil.c:823
xlog_state_shutdown_callbacks+0x23c/0x324 fs/xfs/xfs_log.c:538
xlog_force_shutdown+0x29c/0x350 fs/xfs/xfs_log.c:3821
xlog_ioend_work+0xa8/0xf8 fs/xfs/xfs_log.c:1402
process_one_work+0x848/0x16b4 kernel/workqueue.c:2289
worker_thread+0x8e4/0xfec kernel/workqueue.c:2436
kthread+0x24c/0x2d4 kernel/kthread.c:376
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860
Code: f94002e8 8b180108 91024117 d343fee8 (38fa6908)
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
0: f94002e8 ldr x8, [x23]
4: 8b180108 add x8, x8, x24
8: 91024117 add x23, x8, #0x90
c: d343fee8 lsr x8, x23, #3
* 10: 38fa6908 ldrsb w8, [x8, x26] <-- trapping instruction
---
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.