Hello,
syzbot found the following issue on:
HEAD commit: fb28aa725e05 Linux 6.1.180
git tree: linux-6.1.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1678cbb9580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=31dfefc4a14efea3
dashboard link:
https://syzkaller.appspot.com/bug?extid=76e9b4198eb68d029028
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/9a6fe2a54d0f/disk-fb28aa72.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/742b23a1d931/vmlinux-fb28aa72.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/b3f257c16d2e/bzImage-fb28aa72.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+76e9b4...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in __create_pipe include/linux/usb.h:1959 [inline]
BUG: KASAN: use-after-free in cit_write_reg drivers/media/usb/gspca/xirlink_cit.c:671 [inline]
BUG: KASAN: use-after-free in sd_stopN+0xbb/0xc0 drivers/media/usb/gspca/xirlink_cit.c:2703
Read of size 4 at addr ffff888056b4f000 by task syz.3.29/4507
CPU: 1 PID: 4507 Comm: syz.3.29 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
<TASK>
dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
__create_pipe include/linux/usb.h:1959 [inline]
cit_write_reg drivers/media/usb/gspca/xirlink_cit.c:671 [inline]
sd_stopN+0xbb/0xc0 drivers/media/usb/gspca/xirlink_cit.c:2703
gspca_stream_off+0xad/0x3f0 drivers/media/usb/gspca/gspca.c:742
gspca_stop_streaming+0x44/0x1e0 drivers/media/usb/gspca/gspca.c:1370
__vb2_queue_cancel+0xa6/0xd80 drivers/media/common/videobuf2/videobuf2-core.c:2027
vb2_core_streamoff drivers/media/common/videobuf2/videobuf2-core.c:2184 [inline]
__vb2_cleanup_fileio+0x4e/0x1f0 drivers/media/common/videobuf2/videobuf2-core.c:2754
vb2_core_queue_release+0x13/0x80 drivers/media/common/videobuf2/videobuf2-core.c:2474
vb2_queue_release drivers/media/common/videobuf2/videobuf2-v4l2.c:934 [inline]
_vb2_fop_release drivers/media/common/videobuf2/videobuf2-v4l2.c:1119 [inline]
vb2_fop_release+0x160/0x1e0 drivers/media/common/videobuf2/videobuf2-v4l2.c:1133
v4l2_release+0x25f/0x390 drivers/media/v4l2-core/v4l2-dev.c:459
__fput+0x20a/0x8b0 fs/file_table.c:320
task_work_run+0x1d0/0x260 kernel/task_work.c:203
exit_task_work include/linux/task_work.h:39 [inline]
do_exit+0x9d5/0x2570 kernel/exit.c:887
do_group_exit+0x229/0x2e0 kernel/exit.c:1030
get_signal+0x1259/0x1340 kernel/signal.c:2880
arch_do_signal_or_restart+0xc4/0x1310 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x70/0x110 kernel/entry/common.c:174
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fdd3c99e019
Code: Unable to access opcode bytes at 0x7fdd3c99dfef.
RSP: 002b:00007fdd3d82f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: fffffffffffffe00 RBX: 00007fdd3cc26180 RCX: 00007fdd3c99e019
RDX: 0000000000001000 RSI: 0000200000000600 RDI: 0000000000000008
RBP: 00007fdd3ca3500c R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fdd3cc26218 R14: 00007fdd3cc26180 R15: 00007ffccae6d218
</TASK>
Allocated by task 4433:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
usb_alloc_dev+0x5b/0xda0 drivers/usb/core/usb.c:658
hub_port_connect drivers/usb/core/hub.c:5419 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x20cb/0x5200 drivers/usb/core/hub.c:5899
process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 4314:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x200 mm/slub.c:3700
device_release+0x92/0x1c0 drivers/base/core.c:-1
kobject_cleanup lib/kobject.c:681 [inline]
kobject_release lib/kobject.c:712 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x217/0x450 lib/kobject.c:729
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x1d27/0x5200 drivers/usb/core/hub.c:5899
process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
The buggy address belongs to the object at ffff888056b4f000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 0 bytes inside of
2048-byte region [ffff888056b4f000, ffff888056b4f800)
The buggy address belongs to the physical page:
page:ffffea00015ad200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888056b49000 pfn:0x56b48
head:ffffea00015ad200 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000adc808 ffffea000164dc08 ffff888017442000
raw: ffff888056b49000 0000000000080007 00000001ffffffff 0000000000000000
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 4271, tgid 4271 (syz-executor), ts 73800536048, free_ts 23697327884
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
prep_new_page mm/page_alloc.c:2567 [inline]
get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
__alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
alloc_slab_page+0x5d/0x180 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2d0 mm/slub.c:1997
___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398
kmalloc_trace+0x26/0xe0 mm/slab_common.c:1026
kmalloc include/linux/slab.h:563 [inline]
rtnl_newlink+0x10f/0x1f90 net/core/rtnetlink.c:3665
rtnetlink_rcv_msg+0x863/0xfb0 net/core/rtnetlink.c:6166
netlink_rcv_skb+0x1ef/0x440 net/netlink/af_netlink.c:2516
netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
netlink_unicast+0x7ad/0x920 net/netlink/af_netlink.c:1344
netlink_sendmsg+0x8ad/0xbd0 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:718 [inline]
__sock_sendmsg net/socket.c:730 [inline]
__sys_sendto+0x497/0x650 net/socket.c:2153
__do_sys_sendto net/socket.c:2165 [inline]
__se_sys_sendto net/socket.c:2161 [inline]
__x64_sys_sendto+0xda/0xf0 net/socket.c:2161
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x4c/0xa0 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:1487 [inline]
free_pcp_prepare mm/page_alloc.c:1537 [inline]
free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
free_contig_range+0x9d/0x150 mm/page_alloc.c:9626
destroy_args+0xef/0xa0e mm/debug_vm_pgtable.c:1031
debug_vm_pgtable+0x33c/0x38e mm/debug_vm_pgtable.c:1359
do_one_initcall+0x257/0x800 init/main.c:1309
do_initcall_level+0x13d/0x1ed init/main.c:1382
do_initcalls+0x4b/0x8a init/main.c:1398
kernel_init_freeable+0x401/0x5ab init/main.c:1637
kernel_init+0x19/0x1b0 init/main.c:1525
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888056b4ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888056b4ef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888056b4f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888056b4f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888056b4f100: 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