Hello,
syzbot found the following issue on:
HEAD commit: 91786f140358 Linux 5.15.175
git tree: linux-5.15.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=176192f8580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=1fc30776feb70ea7
dashboard link:
https://syzkaller.appspot.com/bug?extid=7a821d6bf8c8597ba268
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/210b1e4b59b1/disk-91786f14.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/1cf8391059a0/vmlinux-91786f14.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/1d9077a44b1c/bzImage-91786f14.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+7a821d...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in lbmIODone+0x135b/0x1750 fs/jfs/jfs_logmgr.c:2194
Read of size 4 at addr ffff88801b5d2508 by task ksoftirqd/1/20
CPU: 1 PID: 20 Comm: ksoftirqd/1 Not tainted 5.15.175-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
print_address_description+0x63/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
lbmIODone+0x135b/0x1750 fs/jfs/jfs_logmgr.c:2194
req_bio_endio block/blk-core.c:261 [inline]
blk_update_request+0x87c/0x1470 block/blk-core.c:1441
blk_mq_end_request+0x3a/0x70 block/blk-mq.c:575
blk_complete_reqs block/blk-mq.c:587 [inline]
blk_done_softirq+0xf2/0x130 block/blk-mq.c:592
handle_softirqs+0x3a7/0x930 kernel/softirq.c:558
run_ksoftirqd+0xc6/0x120 kernel/softirq.c:925
smpboot_thread_fn+0x51b/0x9d0 kernel/smpboot.c:164
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
</TASK>
Allocated by task 4297:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
kasan_kmalloc include/linux/kasan.h:264 [inline]
kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247
kmalloc include/linux/slab.h:591 [inline]
lbmLogInit fs/jfs/jfs_logmgr.c:1830 [inline]
lmLogInit+0x3b0/0x1c90 fs/jfs/jfs_logmgr.c:1278
open_inline_log fs/jfs/jfs_logmgr.c:1183 [inline]
lmLogOpen+0x552/0x1030 fs/jfs/jfs_logmgr.c:1077
jfs_mount_rw+0xe3/0x640 fs/jfs/jfs_mount.c:253
jfs_fill_super+0x69f/0xc70 fs/jfs/super.c:570
mount_bdev+0x2c9/0x3f0 fs/super.c:1400
legacy_get_tree+0xeb/0x180 fs/fs_context.c:611
vfs_get_tree+0x88/0x270 fs/super.c:1530
do_new_mount+0x2ba/0xb40 fs/namespace.c:3012
do_mount fs/namespace.c:3355 [inline]
__do_sys_mount fs/namespace.c:3563 [inline]
__se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3540
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Freed by task 4168:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x80 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xf1/0x270 mm/slub.c:4559
lbmLogShutdown fs/jfs/jfs_logmgr.c:1873 [inline]
lmLogShutdown+0x500/0x960 fs/jfs/jfs_logmgr.c:1692
lmLogClose+0x293/0x530 fs/jfs/jfs_logmgr.c:1468
jfs_umount+0x298/0x370 fs/jfs/jfs_umount.c:116
jfs_put_super+0x86/0x180 fs/jfs/super.c:194
generic_shutdown_super+0x130/0x310 fs/super.c:475
kill_block_super+0x7a/0xe0 fs/super.c:1427
deactivate_locked_super+0xa0/0x110 fs/super.c:335
cleanup_mnt+0x44e/0x500 fs/namespace.c:1143
task_work_run+0x129/0x1a0 kernel/task_work.c:188
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Last potentially related work creation:
kasan_save_stack+0x36/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348
insert_work+0x54/0x3e0 kernel/workqueue.c:1366
__queue_work+0x963/0xd00 kernel/workqueue.c:1532
queue_work_on+0x14b/0x250 kernel/workqueue.c:1559
queue_work include/linux/workqueue.h:512 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline]
netdevice_event+0x82f/0x960 drivers/infiniband/core/roce_gid_mgmt.c:802
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers+0x145/0x1b0 net/core/dev.c:2044
register_netdevice+0x12e8/0x1720 net/core/dev.c:10396
__ip_tunnel_create+0x2b0/0x370 net/ipv4/ip_tunnel.c:267
ip_tunnel_init_net+0x21f/0x700 net/ipv4/ip_tunnel.c:1098
ops_init+0x35d/0x610 net/core/net_namespace.c:138
setup_net+0x358/0x9e0 net/core/net_namespace.c:332
copy_net_ns+0x392/0x5d0 net/core/net_namespace.c:476
create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226
ksys_unshare+0x531/0xa40 kernel/fork.c:3099
__do_sys_unshare kernel/fork.c:3173 [inline]
__se_sys_unshare kernel/fork.c:3171 [inline]
__x64_sys_unshare+0x34/0x40 kernel/fork.c:3171
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
The buggy address belongs to the object at ffff88801b5d2500
which belongs to the cache kmalloc-192 of size 192
The buggy address is located 8 bytes inside of
192-byte region [ffff88801b5d2500, ffff88801b5d25c0)
The buggy address belongs to the page:
page:ffffea00006d7480 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b5d2
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea00006d7700 0000000800000008 ffff888017441a00
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts
2363025665, free_ts 0
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x3b78/0x3d40 mm/page_alloc.c:4192
__alloc_pages+0x272/0x700 mm/page_alloc.c:5465
alloc_page_interleave+0x22/0x1c0 mm/mempolicy.c:2031
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xbb/0x4b0 mm/slub.c:1975
___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc_trace+0x1a0/0x290 mm/slub.c:3245
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
call_usermodehelper_setup+0x8a/0x260 kernel/umh.c:365
kobject_uevent_env+0x681/0x8d0 lib/kobject_uevent.c:629
kernel_add_sysfs_param+0x106/0x130 kernel/params.c:816
param_sysfs_builtin+0x16a/0x1f0 kernel/params.c:851
param_sysfs_init+0x66/0x70 kernel/params.c:970
do_one_initcall+0x22b/0x7a0 init/main.c:1302
do_initcall_level+0x157/0x210 init/main.c:1375
do_initcalls+0x49/0x90 init/main.c:1391
kernel_init_freeable+0x425/0x5c0 init/main.c:1615
kernel_init+0x19/0x290 init/main.c:1506
page_owner free stack trace missing
Memory state around the buggy address:
ffff88801b5d2400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88801b5d2480: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801b5d2500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801b5d2580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
ffff88801b5d2600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
---
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