Hello,
syzbot found the following issue on:
HEAD commit: 3e48a11675c5 Merge tag 'f2fs-for-7.0-rc1' of git://git.ker..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=13377e5a580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=bdcbd6339981e22b
dashboard link:
https://syzkaller.appspot.com/bug?extid=3b243dd18507e66a063f
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
CC: [
gre...@linuxfoundation.org jiri...@kernel.org linux-...@vger.kernel.org linux-...@vger.kernel.org]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable):
https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-3e48a116.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/0749cae3d374/vmlinux-3e48a116.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/425b8d5bc900/bzImage-3e48a116.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+3b243d...@syzkaller.appspotmail.com
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
==================================================================
BUG: KASAN: slab-use-after-free in pty_write_room+0x89/0xb0 drivers/tty/pty.c:131
Read of size 8 at addr ffff88803cfb5018 by task aoe_tx0/1313
CPU: 0 UID: 0 PID: 1313 Comm: aoe_tx0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xba/0x230 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
pty_write_room+0x89/0xb0 drivers/tty/pty.c:131
handle_tx+0x163/0x610 drivers/net/caif/caif_serial.c:212
__netdev_start_xmit include/linux/netdevice.h:5275 [inline]
netdev_start_xmit include/linux/netdevice.h:5284 [inline]
xmit_one net/core/dev.c:3864 [inline]
dev_hard_start_xmit+0x2d8/0x870 net/core/dev.c:3880
__dev_queue_xmit+0x168f/0x38a0 net/core/dev.c:4829
dev_queue_xmit include/linux/netdevice.h:3384 [inline]
tx+0x6b/0x190 drivers/block/aoe/aoenet.c:62
kthread+0x1e0/0x3f0 drivers/block/aoe/aoecmd.c:1241
kthread+0x388/0x470 kernel/kthread.c:467
ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Allocated by task 5315:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x31c/0x660 mm/slub.c:5297
kmalloc_noprof include/linux/slab.h:962 [inline]
kzalloc_noprof include/linux/slab.h:1204 [inline]
alloc_tty_struct+0xa6/0x7a0 drivers/tty/tty_io.c:3102
pty_common_install+0x17d/0x760 drivers/tty/pty.c:375
tty_driver_install_tty drivers/tty/tty_io.c:1295 [inline]
tty_init_dev+0xd7/0x4d0 drivers/tty/tty_io.c:1407
ptmx_open+0x117/0x340 drivers/tty/pty.c:799
chrdev_open+0x4cd/0x5e0 fs/char_dev.c:411
do_dentry_open+0x785/0x14e0 fs/open.c:949
vfs_open+0x3b/0x340 fs/open.c:1081
do_open fs/namei.c:4671 [inline]
path_openat+0x2e08/0x3860 fs/namei.c:4830
do_file_open+0x23e/0x4a0 fs/namei.c:4859
do_sys_openat2+0x113/0x200 fs/open.c:1366
do_sys_open fs/open.c:1372 [inline]
__do_sys_openat fs/open.c:1388 [inline]
__se_sys_openat fs/open.c:1383 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1383
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
Freed by task 5309:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2670 [inline]
slab_free mm/slub.c:6082 [inline]
kfree+0x1c1/0x630 mm/slub.c:6399
process_one_work kernel/workqueue.c:3275 [inline]
process_scheduled_works+0xb02/0x1830 kernel/workqueue.c:3358
worker_thread+0xa50/0xfc0 kernel/workqueue.c:3439
kthread+0x388/0x470 kernel/kthread.c:467
ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:57
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:556
insert_work+0x3d/0x330 kernel/workqueue.c:2199
__queue_work+0xd03/0x1020 kernel/workqueue.c:2354
queue_work_on+0x106/0x1d0 kernel/workqueue.c:2405
release_tty+0x4c1/0x570 drivers/tty/tty_io.c:1592
tty_release_struct+0xb8/0xd0 drivers/tty/tty_io.c:1692
tty_release+0xcb0/0x1710 drivers/tty/tty_io.c:1852
__fput+0x44f/0xa70 fs/file_table.c:469
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop+0xed/0x480 kernel/entry/common.c:98
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline]
do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88803cfb5000
which belongs to the cache kmalloc-cg-2k of size 2048
The buggy address is located 24 bytes inside of
freed 2048-byte region [ffff88803cfb5000, ffff88803cfb5800)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3cfb0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88803cfb0811
flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 04fff00000000040 ffff88801a8583c0 dead000000000100 dead000000000122
raw: 0000000000000000 0000100000080008 00000000f5000000 ffff88803cfb0811
head: 04fff00000000040 ffff88801a8583c0 dead000000000100 dead000000000122
head: 0000000000000000 0000100000080008 00000000f5000000 ffff88803cfb0811
head: 04fff00000000003 ffffea0000f3ec01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5315, tgid 5314 (syz.0.0), ts 74707829504, free_ts 74677952118
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x231/0x280 mm/page_alloc.c:1888
prep_new_page mm/page_alloc.c:1896 [inline]
get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3961
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5249
alloc_slab_page mm/slub.c:3238 [inline]
allocate_slab+0x77/0x660 mm/slub.c:3411
new_slab mm/slub.c:3469 [inline]
refill_objects+0x331/0x3c0 mm/slub.c:7091
refill_sheaf mm/slub.c:2787 [inline]
__pcs_replace_empty_main+0x2b9/0x620 mm/slub.c:4536
alloc_from_pcs mm/slub.c:4639 [inline]
slab_alloc_node mm/slub.c:4773 [inline]
__do_kmalloc_node mm/slub.c:5176 [inline]
__kmalloc_node_track_caller_noprof+0x572/0x7b0 mm/slub.c:5285
kmemdup_noprof+0x2b/0x70 mm/util.c:138
kmemdup_noprof include/linux/fortify-string.h:763 [inline]
neigh_sysctl_register+0xae/0xa90 net/core/neighbour.c:3861
devinet_sysctl_register+0xad/0x200 net/ipv4/devinet.c:2714
inetdev_init+0x2a4/0x4e0 net/ipv4/devinet.c:291
inetdev_event+0x30d/0x1610 net/ipv4/devinet.c:1590
notifier_call_chain+0x1be/0x400 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2280 [inline]
call_netdevice_notifiers net/core/dev.c:2294 [inline]
register_netdevice+0x173a/0x1cf0 net/core/dev.c:11444
ldisc_open+0x4c0/0x840 drivers/net/caif/caif_serial.c:340
tty_ldisc_open+0xa1/0x100 drivers/tty/tty_ldisc.c:432
page last free pid 5314 tgid 5314 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1432 [inline]
__free_frozen_pages+0xc00/0xd90 mm/page_alloc.c:2977
__slab_free+0x263/0x2b0 mm/slub.c:5490
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x100 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4459 [inline]
slab_alloc_node mm/slub.c:4788 [inline]
__kmalloc_cache_noprof+0x2ba/0x660 mm/slub.c:5292
kmalloc_noprof include/linux/slab.h:962 [inline]
kzalloc_noprof include/linux/slab.h:1204 [inline]
task_numa_work+0x9c4/0x1620 kernel/sched/fair.c:3430
task_work_run+0x1d9/0x270 kernel/task_work.c:233
resume_user_mode_work+0x5b/0x90 include/linux/resume_user_mode.h:50
__exit_to_user_mode_loop kernel/entry/common.c:67 [inline]
exit_to_user_mode_loop kernel/entry/common.c:98 [inline]
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:270 [inline]
irqentry_exit_to_user_mode include/linux/irq-entry-common.h:339 [inline]
irqentry_exit+0x185/0x620 kernel/entry/common.c:219
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
Memory state around the buggy address:
ffff88803cfb4f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88803cfb4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88803cfb5000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88803cfb5080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88803cfb5100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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