================================================================== BUG: KASAN: slab-out-of-bounds in __list_add_valid_or_report+0x151/0x190 lib/list_debug.c:32 Read of size 8 at addr ffff88811309c250 by task kworker/0:5/5309 CPU: 0 UID: 0 PID: 5309 Comm: kworker/0:5 Not tainted 6.14.0-syzkaller-ga2cc6ff5ec8f #0 PREEMPT(voluntary) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: events request_module_async Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xc3/0x670 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 __list_add_valid_or_report+0x151/0x190 lib/list_debug.c:32 __list_add_valid include/linux/list.h:88 [inline] __list_add include/linux/list.h:150 [inline] list_add_tail include/linux/list.h:183 [inline] em28xx_init_extension+0x48/0x200 drivers/media/usb/em28xx/em28xx-core.c:1114 request_module_async+0x61/0x70 drivers/media/usb/em28xx/em28xx-cards.c:3457 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c2/0x780 kernel/kthread.c:464 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 2837: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4331 [inline] __kmalloc_node_track_caller_noprof+0x212/0x4c0 mm/slub.c:4350 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:599 __alloc_skb+0x166/0x380 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1340 [inline] alloc_skb_with_frags+0xe0/0x860 net/core/skbuff.c:6639 sock_alloc_send_pskb+0x7fb/0x990 net/core/sock.c:2949 unix_dgram_sendmsg+0x45a/0x1860 net/unix/af_unix.c:2007 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] __sys_sendto+0x495/0x510 net/socket.c:2180 __do_sys_sendto net/socket.c:2187 [inline] __se_sys_sendto net/socket.c:2183 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2183 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 2830: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x37/0x50 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2389 [inline] slab_free mm/slub.c:4646 [inline] kfree+0x286/0x470 mm/slub.c:4845 skb_kfree_head net/core/skbuff.c:1058 [inline] skb_free_head+0x108/0x1d0 net/core/skbuff.c:1070 skb_release_data+0x7a5/0x960 net/core/skbuff.c:1097 skb_release_all net/core/skbuff.c:1162 [inline] __kfree_skb net/core/skbuff.c:1176 [inline] consume_skb net/core/skbuff.c:1408 [inline] consume_skb+0xbf/0x100 net/core/skbuff.c:1402 __unix_dgram_recvmsg+0x818/0xe60 net/unix/af_unix.c:2505 unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2522 sock_recvmsg_nosec net/socket.c:1017 [inline] sock_recvmsg+0x1f6/0x250 net/socket.c:1039 sock_read_iter+0x2b9/0x3b0 net/socket.c:1109 new_sync_read fs/read_write.c:489 [inline] vfs_read+0xaa3/0xc70 fs/read_write.c:570 ksys_read+0x205/0x240 fs/read_write.c:713 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88811309c000 which belongs to the cache kmalloc-cg-512 of size 512 The buggy address is located 80 bytes to the right of allocated 512-byte region [ffff88811309c000, ffff88811309c200) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11309c head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888111a2ae01 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff88810004b140 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000000f5000000 ffff888111a2ae01 head: 0200000000000040 ffff88810004b140 dead000000000122 0000000000000000 head: 0000000000000000 0000000000100010 00000000f5000000 ffff888111a2ae01 head: 0200000000000002 ffffea00044c2701 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000004 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 2837, tgid 2837 (klogd), ts 556403723060, free_ts 555448394862 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x181/0x1b0 mm/page_alloc.c:1717 prep_new_page mm/page_alloc.c:1725 [inline] get_page_from_freelist+0x10ca/0x2fd0 mm/page_alloc.c:3652 __alloc_frozen_pages_noprof+0x259/0x2110 mm/page_alloc.c:4934 alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2459 [inline] allocate_slab mm/slub.c:2623 [inline] new_slab+0x23c/0x330 mm/slub.c:2676 ___slab_alloc+0xda5/0x1940 mm/slub.c:3862 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3952 __slab_alloc_node mm/slub.c:4027 [inline] slab_alloc_node mm/slub.c:4188 [inline] __do_kmalloc_node mm/slub.c:4330 [inline] __kmalloc_node_track_caller_noprof+0x15e/0x4c0 mm/slub.c:4350 kmalloc_reserve+0xef/0x2c0 net/core/skbuff.c:599 __alloc_skb+0x166/0x380 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1340 [inline] alloc_skb_with_frags+0xe0/0x860 net/core/skbuff.c:6639 sock_alloc_send_pskb+0x7fb/0x990 net/core/sock.c:2949 unix_dgram_sendmsg+0x45a/0x1860 net/unix/af_unix.c:2007 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] __sys_sendto+0x495/0x510 net/socket.c:2180 __do_sys_sendto net/socket.c:2187 [inline] __se_sys_sendto net/socket.c:2183 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2183 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x260 arch/x86/entry/syscall_64.c:94 page last free pid 23 tgid 23 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1262 [inline] __free_frozen_pages+0x66c/0xe70 mm/page_alloc.c:2680 __folio_put+0x1e7/0x2d0 mm/swap.c:112 hiddev_free drivers/hid/hid-core.c:759 [inline] kref_put include/linux/kref.h:65 [inline] hid_device_release+0x133/0x190 drivers/hid/hid-core.c:766 device_release+0xa1/0x240 drivers/base/core.c:2568 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1e4/0x5a0 lib/kobject.c:737 put_device+0x1f/0x30 drivers/base/core.c:3774 usbhid_probe+0xf0e/0x13f0 drivers/hid/usbhid/hid-core.c:1443 usb_probe_interface+0x300/0x9c0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x156/0x1e0 drivers/base/bus.c:462 __device_attach+0x1e4/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537 device_add+0x1148/0x1a70 drivers/base/core.c:3666 Memory state around the buggy address: ffff88811309c100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811309c180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88811309c200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88811309c280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811309c300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================