Hello,
syzbot found the following issue on:
HEAD commit: 3ad9f1eca4fa UPSTREAM: ipv4: validate checksum_start befor..
git tree: android14-6.1
console output:
https://syzkaller.appspot.com/x/log.txt?x=17205831580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=3533141b441d6292
dashboard link:
https://syzkaller.appspot.com/bug?extid=1d7ac4426e34173ae8ba
compiler: Debian clang version 22.1.8 (1~deb13u4), Debian LLD 22.1.8
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=158fd029580000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=14026e7f980000
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/f4019d54c9b2/disk-3ad9f1ec.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/a268a5572544/vmlinux-3ad9f1ec.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/c2b294b092ec/bzImage-3ad9f1ec.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+1d7ac4...@syzkaller.appspotmail.com
usb 2-1: USB disconnect, device number 5
==================================================================
BUG: KASAN: use-after-free in roccat_disconnect+0x22d/0x240 drivers/hid/hid-roccat.c:373
Read of size 4 at addr ffff88811cc45c08 by task kworker/0:0/6
CPU: 0 PID: 6 Comm: kworker/0:0 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Workqueue: usb_hub_wq hub_event
Call Trace:
<TASK>
__dump_stack+0x21/0x24 lib/dump_stack.c:88
dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
print_address_description+0x71/0x200 mm/kasan/report.c:316
print_report+0x4a/0x60 mm/kasan/report.c:420
kasan_report+0x122/0x150 mm/kasan/report.c:524
__asan_report_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350
roccat_disconnect+0x22d/0x240 drivers/hid/hid-roccat.c:373
savu_remove_specials drivers/hid/hid-roccat-savu.c:107 [inline]
savu_remove+0xec/0x170 drivers/hid/hid-roccat-savu.c:147
hid_device_remove+0x292/0x3c0 drivers/hid/hid-core.c:-1
device_remove drivers/base/dd.c:548 [inline]
__device_release_driver drivers/base/dd.c:1283 [inline]
device_release_driver_internal+0x486/0x7e0 drivers/base/dd.c:1309
device_release_driver+0x19/0x20 drivers/base/dd.c:1332
bus_remove_device+0x2f0/0x350 drivers/base/bus.c:531
device_del+0x63c/0xe50 drivers/base/core.c:3886
hid_remove_device drivers/hid/hid-core.c:2872 [inline]
hid_destroy_device+0x6a/0x110 drivers/hid/hid-core.c:2891
usbhid_disconnect+0x9f/0xc0 drivers/hid/usbhid/hid-core.c:1469
usb_unbind_interface+0x223/0x8b0 drivers/usb/core/driver.c:459
device_remove drivers/base/dd.c:550 [inline]
__device_release_driver drivers/base/dd.c:1283 [inline]
device_release_driver_internal+0x4e4/0x7e0 drivers/base/dd.c:1309
device_release_driver+0x19/0x20 drivers/base/dd.c:1332
bus_remove_device+0x2f0/0x350 drivers/base/bus.c:531
device_del+0x63c/0xe50 drivers/base/core.c:3886
usb_disable_device+0x3a8/0x750 drivers/usb/core/message.c:1472
usb_disconnect+0x32d/0x880 drivers/usb/core/hub.c:2339
hub_port_connect drivers/usb/core/hub.c:5433 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5734 [inline]
port_event drivers/usb/core/hub.c:5898 [inline]
hub_event+0x1a66/0x4310 drivers/usb/core/hub.c:5980
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
</TASK>
Allocated by task 6:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
____kasan_kmalloc mm/kasan/common.c:380 [inline]
__kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
kasan_kmalloc include/linux/kasan.h:212 [inline]
kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
roccat_connect+0x5c/0x4b0 drivers/hid/hid-roccat.c:306
savu_init_specials drivers/hid/hid-roccat-savu.c:81 [inline]
savu_probe+0x1ba/0x360 drivers/hid/hid-roccat-savu.c:131
hid_device_probe+0x267/0x3a0 drivers/hid/hid-core.c:2672
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2d7/0x9a0 drivers/base/dd.c:639
__driver_probe_device+0x193/0x270 drivers/base/dd.c:808
driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
__device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
bus_for_each_drv+0x192/0x220 drivers/base/bus.c:429
__device_attach+0x2b0/0x420 drivers/base/dd.c:1038
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
device_add+0xb0b/0xec0 drivers/base/core.c:3698
hid_add_device+0x3b8/0x580 drivers/hid/hid-core.c:2824
usbhid_probe+0xc12/0xff0 drivers/hid/usbhid/hid-core.c:1442
usb_probe_interface+0x621/0xb30 drivers/usb/core/driver.c:397
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2d7/0x9a0 drivers/base/dd.c:639
__driver_probe_device+0x193/0x270 drivers/base/dd.c:808
driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
__device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
bus_for_each_drv+0x192/0x220 drivers/base/bus.c:429
__device_attach+0x2b0/0x420 drivers/base/dd.c:1038
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
device_add+0xb0b/0xec0 drivers/base/core.c:3698
usb_set_configuration+0x1a01/0x1f70 drivers/usb/core/message.c:2223
usb_generic_driver_probe+0x91/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x154/0x260 drivers/usb/core/driver.c:294
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2d7/0x9a0 drivers/base/dd.c:639
__driver_probe_device+0x193/0x270 drivers/base/dd.c:808
driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
__device_attach_driver+0x2e9/0x4a0 drivers/base/dd.c:966
bus_for_each_drv+0x192/0x220 drivers/base/bus.c:429
__device_attach+0x2b0/0x420 drivers/base/dd.c:1038
device_initial_probe+0x1a/0x20 drivers/base/dd.c:1087
bus_probe_device+0xc0/0x1f0 drivers/base/bus.c:489
device_add+0xb0b/0xec0 drivers/base/core.c:3698
usb_new_device+0x9f4/0x1500 drivers/usb/core/hub.c:2684
hub_port_connect drivers/usb/core/hub.c:5594 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5734 [inline]
port_event drivers/usb/core/hub.c:5898 [inline]
hub_event+0x27fb/0x4310 drivers/usb/core/hub.c:5980
process_one_work+0x717/0xc30 kernel/workqueue.c:2302
worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
kthread+0x281/0x320 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 442:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
__kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
kasan_slab_free include/linux/kasan.h:178 [inline]
slab_free_hook mm/slub.c:1750 [inline]
slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
slab_free mm/slub.c:3712 [inline]
__kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728
kfree+0x6f/0xf0 mm/slab_common.c:990
roccat_release+0x2bc/0x380 drivers/hid/hid-roccat.c:229
__fput+0x1fd/0x8f0 fs/file_table.c:320
____fput+0x15/0x20 fs/file_table.c:348
task_work_run+0x1e1/0x250 kernel/task_work.c:203
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177
exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210
__syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x68/0xd2
The buggy address belongs to the object at ffff88811cc45c00
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 8 bytes inside of
512-byte region [ffff88811cc45c00, ffff88811cc45e00)
The buggy address belongs to the physical page:
page:ffffea0004731100 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88811cc46c00 pfn:0x11cc44
head:ffffea0004731100 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004729200 dead000000000002 ffff888100042f00
raw: ffff88811cc46c00 000000008010000d 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 108, tgid 108 (udevd), ts
6287752816, free_ts 0
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
__alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
allocate_slab mm/slub.c:1967 [inline]
new_slab+0x98/0x3e0 mm/slub.c:2020
___slab_alloc+0x70f/0xb70 mm/slub.c:3177
__slab_alloc+0x5e/0xa0 mm/slub.c:3263
slab_alloc_node mm/slub.c:3348 [inline]
__kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
__do_kmalloc_node mm/slab_common.c:937 [inline]
__kmalloc_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958
kmalloc_reserve net/core/skbuff.c:449 [inline]
__alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
alloc_skb include/linux/skbuff.h:1322 [inline]
alloc_skb_with_frags+0xa8/0x620 net/core/skbuff.c:6176
sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2770
unix_dgram_sendmsg+0x5c1/0x1710 net/unix/af_unix.c:1959
sock_sendmsg_nosec net/socket.c:716 [inline]
__sock_sendmsg net/socket.c:728 [inline]
sock_write_iter+0x2ea/0x3f0 net/socket.c:1134
call_write_iter include/linux/fs.h:2282 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x5ef/0xd00 fs/read_write.c:584
page_owner free stack trace missing
Memory state around the buggy address:
ffff88811cc45b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811cc45b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811cc45c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811cc45c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88811cc45d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
usb 3-1: USB disconnect, device number 7
usb 2-1: new high-speed USB device number 8 using dummy_hcd
usb 2-1: config 0 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
usb 2-1: config 0 interface 0 altsetting 0 endpoint 0x81 has invalid wMaxPacketSize 0
usb 2-1: New USB device found, idVendor=1e7d, idProduct=2d5a, bcdDevice= 0.00
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: config 0 descriptor??
savu 0003:1E7D:2D5A.0020: hidraw1: USB HID v0.00 Device [HID 1e7d:2d5a] on usb-dummy_hcd.1-1/input0
usb 1-1: USB disconnect, device number 9
usb 3-1: USB disconnect, device number 9
usb 2-1: new high-speed USB device number 10 using dummy_hcd
usb 2-1: config 0 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 0, changing to 7
usb 2-1: config 0 interface 0 altsetting 0 endpoint 0x81 has invalid wMaxPacketSize 0
usb 2-1: New USB device found, idVendor=1e7d, idProduct=2d5a, bcdDevice= 0.00
usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 2-1: config 0 descriptor??
savu 0003:1E7D:2D5A.002A: hidraw1: USB HID v0.00 Device [HID 1e7d:2d5a] on usb-dummy_hcd.1-1/input0
---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
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