================================================================== BUG: KASAN: use-after-free in register_lock_class+0xfd2/0x11a0 kernel/locking/lockdep.c:1307 Read of size 1 at addr ffff88810c2aed11 by task kworker/1:1/28 CPU: 1 PID: 28 Comm: kworker/1:1 Not tainted 5.17.0-rc6-syzkaller-00100-g98d107b84614 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: mld mld_ifc_work Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x336 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 register_lock_class+0xfd2/0x11a0 kernel/locking/lockdep.c:1307 __lock_acquire+0x10b/0x56c0 kernel/locking/lockdep.c:4906 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:354 [inline] cdc_ncm_tx_fixup+0x8f/0x120 drivers/net/usb/cdc_ncm.c:1527 usbnet_start_xmit+0x152/0x1f70 drivers/net/usb/usbnet.c:1372 __netdev_start_xmit include/linux/netdevice.h:4683 [inline] netdev_start_xmit include/linux/netdevice.h:4697 [inline] xmit_one net/core/dev.c:3473 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3489 sch_direct_xmit+0x25b/0x7a0 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3700 [inline] __dev_queue_xmit+0x11b0/0x3200 net/core/dev.c:4081 neigh_resolve_output net/core/neighbour.c:1528 [inline] neigh_resolve_output+0x50e/0x830 net/core/neighbour.c:1508 neigh_output include/net/neighbour.h:549 [inline] ip6_finish_output2+0xb48/0x1b10 net/ipv6/ip6_output.c:126 __ip6_finish_output.part.0+0x546/0xa90 net/ipv6/ip6_output.c:191 __ip6_finish_output include/linux/skbuff.h:1014 [inline] ip6_finish_output net/ipv6/ip6_output.c:201 [inline] NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x39e/0x7e0 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] mld_sendpack+0x96f/0xe00 net/ipv6/mcast.c:1826 mld_send_cr net/ipv6/mcast.c:2127 [inline] mld_ifc_work+0x71c/0xdc0 net/ipv6/mcast.c:2659 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2ef/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 4221: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc+0x81/0xa0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:714 [inline] cdc_ncm_bind_common+0xb8/0x2df0 drivers/net/usb/cdc_ncm.c:826 cdc_ncm_bind+0x7c/0x1c0 drivers/net/usb/cdc_ncm.c:1069 usbnet_probe+0xaf8/0x2580 drivers/net/usb/usbnet.c:1747 usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x245/0xcc0 drivers/base/dd.c:596 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:755 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:785 __device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:902 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427 __device_attach+0x228/0x4a0 drivers/base/dd.c:973 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487 device_add+0xb83/0x1e20 drivers/base/core.c:3405 usb_set_configuration+0x101e/0x1900 drivers/usb/core/message.c:2170 usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238 usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:517 [inline] really_probe+0x245/0xcc0 drivers/base/dd.c:596 __driver_probe_device+0x338/0x4d0 drivers/base/dd.c:755 driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:785 __device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:902 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427 __device_attach+0x228/0x4a0 drivers/base/dd.c:973 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487 device_add+0xb83/0x1e20 drivers/base/core.c:3405 usb_new_device.cold+0x63f/0x108e drivers/usb/core/hub.c:2566 hub_port_connect drivers/usb/core/hub.c:5363 [inline] hub_port_connect_change drivers/usb/core/hub.c:5507 [inline] port_event drivers/usb/core/hub.c:5665 [inline] hub_event+0x2585/0x44d0 drivers/usb/core/hub.c:5747 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2ef/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Freed by task 4221: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:366 [inline] ____kasan_slab_free+0x102/0x150 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:236 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook mm/slub.c:1754 [inline] slab_free mm/slub.c:3509 [inline] kfree+0xc4/0x410 mm/slub.c:4562 cdc_ncm_free+0x145/0x1a0 drivers/net/usb/cdc_ncm.c:786 cdc_ncm_unbind+0x1a7/0x340 drivers/net/usb/cdc_ncm.c:1021 usbnet_disconnect+0x103/0x270 drivers/net/usb/usbnet.c:1620 usb_unbind_interface+0x1d8/0x8e0 drivers/usb/core/driver.c:458 __device_release_driver+0x627/0x760 drivers/base/dd.c:1209 device_release_driver_internal drivers/base/dd.c:1242 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1265 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:529 device_del+0x4f3/0xc80 drivers/base/core.c:3592 usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1419 usb_disconnect.cold+0x27a/0x78e drivers/usb/core/hub.c:2228 hub_port_connect drivers/usb/core/hub.c:5207 [inline] hub_port_connect_change drivers/usb/core/hub.c:5507 [inline] port_event drivers/usb/core/hub.c:5665 [inline] hub_event+0x1e39/0x44d0 drivers/usb/core/hub.c:5747 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 process_scheduled_works kernel/workqueue.c:2370 [inline] worker_thread+0x833/0x1110 kernel/workqueue.c:2456 kthread+0x2ef/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88810c2aec00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 273 bytes inside of 512-byte region [ffff88810c2aec00, ffff88810c2aee00) The buggy address belongs to the page: page:ffffea000430ab00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10c2ac head:ffffea000430ab00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x200000000010200(slab|head|node=0|zone=2) raw: 0200000000010200 ffffea0004558d00 dead000000000002 ffff888100041c80 raw: 0000000000000000 0000000000100010 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 216, ts 4688053339, free_ts 0 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0x122d/0x2940 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2271 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x27f/0x3e0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0xc12/0x1450 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc_trace+0x2e6/0x3a0 mm/slub.c:3255 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:714 [inline] alloc_bprm+0x51/0x8f0 fs/exec.c:1507 kernel_execve+0x55/0x460 fs/exec.c:1947 call_usermodehelper_exec_async+0x2e3/0x580 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page_owner free stack trace missing Memory state around the buggy address: ffff88810c2aec00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810c2aec80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88810c2aed00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810c2aed80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810c2aee00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================