Hello,
syzbot found the following issue on:
HEAD commit: a1153c0deb44 Linux 6.6.147
git tree: linux-6.6.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=12184db9580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=f0bc3d90c30838b5
dashboard link:
https://syzkaller.appspot.com/bug?extid=ee0a83ffd5ebd6b71833
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/9f646bfa1b52/disk-a1153c0d.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/a2aec2e8f0fd/vmlinux-a1153c0d.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/a7abe1f87405/bzImage-a1153c0d.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+ee0a83...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-use-after-free in strlen+0x57/0x70 lib/string.c:425
Read of size 1 at addr ffff8880259504c0 by task kworker/u4:19/6437
CPU: 0 PID: 6437 Comm: kworker/u4:19 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: events_unbound linkwatch_event
Call Trace:
<TASK>
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
strlen+0x57/0x70 lib/string.c:425
nla_put_string+0x19/0x30 include/net/netlink.h:1566
rtnl_fill_ifinfo+0x1ca8/0x1e50 net/core/rtnetlink.c:1943
rtmsg_ifinfo_build_skb+0x18b/0x260 net/core/rtnetlink.c:4084
rtmsg_ifinfo_event net/core/rtnetlink.c:4118 [inline]
rtmsg_ifinfo+0x8c/0x1a0 net/core/rtnetlink.c:4127
netdev_state_change+0xfe/0x170 net/core/dev.c:1423
linkwatch_do_dev+0x10d/0x160 net/core/link_watch.c:191
__linkwatch_run_queue+0x417/0x670 net/core/link_watch.c:244
linkwatch_event+0x4c/0x60 net/core/link_watch.c:287
process_one_work kernel/workqueue.c:2653 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
</TASK>
Allocated by task 12747:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kasan_kmalloc include/linux/kasan.h:198 [inline]
__do_kmalloc_node mm/slab_common.c:1007 [inline]
__kmalloc_node_track_caller+0xb4/0x230 mm/slab_common.c:1027
kvasprintf+0xec/0x1a0 lib/kasprintf.c:25
kobject_set_name_vargs+0x61/0x110 lib/kobject.c:274
dev_set_name+0xe3/0x140 drivers/base/core.c:3488
usb_add_gadget+0x475/0x6f0 drivers/usb/gadget/udc/core.c:1448
usb_add_gadget_udc_release+0x19c/0x1f0 drivers/usb/gadget/udc/core.c:1506
dummy_udc_probe+0x68a/0x780 drivers/usb/gadget/udc/dummy_hcd.c:1102
platform_probe+0x13b/0x1c0 drivers/base/platform.c:1376
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x247/0xae0 drivers/base/dd.c:717
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:879
device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1206
bind_store+0x1cc/0x210 drivers/base/bus.c:267
kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x474/0x9a0 fs/read_write.c:584
ksys_write+0x151/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Freed by task 13322:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
kobject_cleanup lib/kobject.c:695 [inline]
kobject_release lib/kobject.c:720 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x260/0x450 lib/kobject.c:737
platform_remove+0x6d/0xe0 drivers/base/platform.c:1396
device_remove drivers/base/dd.c:626 [inline]
__device_release_driver drivers/base/dd.c:1351 [inline]
device_release_driver_internal+0x408/0x6f0 drivers/base/dd.c:1374
unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
kernfs_fop_write_iter+0x3a4/0x520 fs/kernfs/file.c:352
call_write_iter include/linux/fs.h:2018 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x474/0x9a0 fs/read_write.c:584
ksys_write+0x151/0x260 fs/read_write.c:637
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff8880259504c0
which belongs to the cache kmalloc-16 of size 16
The buggy address is located 0 bytes inside of
freed 16-byte region [ffff8880259504c0, ffff8880259504d0)
The buggy address belongs to the physical page:
page:ffffea0000965400 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880259503c0 pfn:0x25950
flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000800 ffff888017c413c0 ffffea0000905090 ffffea0000b266d0
raw: ffff8880259503c0 000000000080007a 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 5777, tgid 5777 (syz-executor), ts 372248860597, free_ts 372218982569
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
prep_new_page mm/page_alloc.c:1589 [inline]
get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
__alloc_pages_node include/linux/gfp.h:237 [inline]
alloc_slab_page+0x4f/0x180 mm/slub.c:1883
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x11f/0x250 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc_node+0xa6/0x240 mm/slab_common.c:1014
kmalloc_node include/linux/slab.h:620 [inline]
kvmalloc_node+0x70/0x180 mm/util.c:617
xt_jumpstack_alloc net/netfilter/x_tables.c:1377 [inline]
xt_replace_table+0x185/0x750 net/netfilter/x_tables.c:1416
__do_replace+0x169/0x9b0 net/ipv6/netfilter/ip6_tables.c:1079
do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline]
do_ip6t_set_ctl+0xb41/0xe10 net/ipv6/netfilter/ip6_tables.c:1641
nf_setsockopt+0x263/0x280 net/netfilter/nf_sockopt.c:101
do_sock_setsockopt+0x175/0x1a0 net/socket.c:2322
__sys_setsockopt net/socket.c:2345 [inline]
__do_sys_setsockopt net/socket.c:2354 [inline]
__se_sys_setsockopt net/socket.c:2351 [inline]
__x64_sys_setsockopt+0x182/0x200 net/socket.c:2351
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1182 [inline]
free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459
tlb_batch_list_free mm/mmu_gather.c:115 [inline]
tlb_finish_mmu+0x13e/0x220 mm/mmu_gather.c:428
exit_mmap+0x428/0xb90 mm/mmap.c:3315
__mmput+0x118/0x3a0 kernel/fork.c:1362
exit_mm+0x23f/0x340 kernel/exit.c:576
do_exit+0x909/0x2530 kernel/exit.c:877
do_group_exit+0x22d/0x2f0 kernel/exit.c:1032
__do_sys_exit_group kernel/exit.c:1043 [inline]
__se_sys_exit_group kernel/exit.c:1041 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1041
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
Memory state around the buggy address:
ffff888025950380: fa fb fc fc fa fb fc fc fb fb fc fc fa fb fc fc
ffff888025950400: fa fb fc fc fa fb fc fc fa fb fc fc 00 00 fc fc
>ffff888025950480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
^
ffff888025950500: fa fb fc fc fa fb fc fc 00 04 fc fc fa fb fc fc
ffff888025950580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
==================================================================
---
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