bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): Released all slaves ================================================================== BUG: KASAN: slab-use-after-free in cfusbl_device_notify+0x7c4/0x860 net/caif/caif_usb.c:138 Read of size 8 at addr ffff888029db46f0 by task kworker/u8:2/38 CPU: 1 PID: 38 Comm: kworker/u8:2 Not tainted 6.2.0-syzkaller-12017-g1ec35eadc3b4 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:319 print_report mm/kasan/report.c:430 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:536 cfusbl_device_notify+0x7c4/0x860 net/caif/caif_usb.c:138 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1937 call_netdevice_notifiers_extack net/core/dev.c:1975 [inline] call_netdevice_notifiers net/core/dev.c:1989 [inline] netdev_wait_allrefs_any net/core/dev.c:10226 [inline] netdev_run_todo+0xc54/0x1100 net/core/dev.c:10340 default_device_exit_batch+0x456/0x5b0 net/core/dev.c:11351 ops_exit_list+0x125/0x170 net/core/net_namespace.c:174 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:613 process_one_work+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 5183: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] ____kasan_kmalloc mm/kasan/common.c:333 [inline] __kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:196 [inline] __do_kmalloc_node mm/slab_common.c:967 [inline] __kmalloc_node+0x5d/0xd0 mm/slab_common.c:974 kmalloc_node include/linux/slab.h:610 [inline] kvmalloc_node+0xa2/0x1a0 mm/util.c:603 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9c/0x1250 net/core/dev.c:10585 rtnl_create_link+0xbeb/0xee0 net/core/rtnetlink.c:3312 veth_newlink+0x226/0x9c0 drivers/net/veth.c:1791 rtnl_newlink_create net/core/rtnetlink.c:3440 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3657 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6174 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1942 sock_sendmsg_nosec net/socket.c:722 [inline] sock_sendmsg+0xde/0x190 net/socket.c:745 __sys_sendto+0x23a/0x340 net/socket.c:2145 __do_sys_sendto net/socket.c:2157 [inline] __se_sys_sendto net/socket.c:2153 [inline] __x64_sys_sendto+0xe1/0x1b0 net/socket.c:2153 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 38: kasan_save_stack+0x22/0x40 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x13b/0x1a0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] __cache_free mm/slab.c:3390 [inline] __do_kmem_cache_free mm/slab.c:3577 [inline] __kmem_cache_free+0xcd/0x2c0 mm/slab.c:3584 kvfree+0x46/0x50 mm/util.c:649 device_release+0xa3/0x240 drivers/base/core.c:2436 kobject_cleanup lib/kobject.c:681 [inline] kobject_release lib/kobject.c:712 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1c2/0x4d0 lib/kobject.c:729 netdev_run_todo+0x762/0x1100 net/core/dev.c:10359 default_device_exit_batch+0x456/0x5b0 net/core/dev.c:11351 ops_exit_list+0x125/0x170 net/core/net_namespace.c:174 cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:613 process_one_work+0x9bf/0x1820 kernel/workqueue.c:2390 worker_thread+0x669/0x1090 kernel/workqueue.c:2537 kthread+0x2e8/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff888029db4000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1776 bytes inside of freed 4096-byte region [ffff888029db4000, ffff888029db5000) The buggy address belongs to the physical page: page:ffffea0000a76d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29db4 head:ffffea0000a76d00 order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffff88801244da00 ffffea000096a090 ffffea0000a76d90 raw: 0000000000000000 ffff888029db4000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x2460c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__GFP_THISNODE), pid 5183, tgid 5183 (syz-executor.0), ts 239351038983, free_ts 65187629149 prep_new_page mm/page_alloc.c:2552 [inline] get_page_from_freelist+0x1190/0x2f80 mm/page_alloc.c:4325 __alloc_pages_slowpath.constprop.0+0x2fb/0x23f0 mm/page_alloc.c:5125 __alloc_pages+0x4ae/0x5c0 mm/page_alloc.c:5604 __alloc_pages_node include/linux/gfp.h:237 [inline] kmem_getpages mm/slab.c:1360 [inline] cache_grow_begin+0x9b/0x3b0 mm/slab.c:2570 cache_alloc_refill+0x27f/0x380 mm/slab.c:2943 ____cache_alloc mm/slab.c:3019 [inline] ____cache_alloc mm/slab.c:3002 [inline] __do_cache_alloc mm/slab.c:3202 [inline] slab_alloc_node mm/slab.c:3250 [inline] __kmem_cache_alloc_node+0x360/0x3f0 mm/slab.c:3541 __do_kmalloc_node mm/slab_common.c:966 [inline] __kmalloc_node+0x4d/0xd0 mm/slab_common.c:974 kmalloc_node include/linux/slab.h:610 [inline] kvmalloc_node+0xa2/0x1a0 mm/util.c:603 kvmalloc include/linux/slab.h:737 [inline] kvzalloc include/linux/slab.h:745 [inline] alloc_netdev_mqs+0x9c/0x1250 net/core/dev.c:10585 rtnl_create_link+0xbeb/0xee0 net/core/rtnetlink.c:3312 veth_newlink+0x226/0x9c0 drivers/net/veth.c:1791 rtnl_newlink_create net/core/rtnetlink.c:3440 [inline] __rtnl_newlink+0x10c2/0x1840 net/core/rtnetlink.c:3657 rtnl_newlink+0x68/0xa0 net/core/rtnetlink.c:3670 rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6174 netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2574 netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline] netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1453 [inline] free_pcp_prepare+0x668/0xb50 mm/page_alloc.c:1503 free_unref_page_prepare mm/page_alloc.c:3387 [inline] free_unref_page+0x1d/0x490 mm/page_alloc.c:3482 __stack_depot_save+0x16c/0x510 lib/stackdepot.c:437 kasan_save_stack+0x32/0x40 mm/kasan/common.c:46 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x13b/0x1a0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:162 [inline] __cache_free mm/slab.c:3390 [inline] __do_kmem_cache_free mm/slab.c:3577 [inline] kmem_cache_free mm/slab.c:3602 [inline] kmem_cache_free+0x108/0x3e0 mm/slab.c:3595 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:924 __kfree_skb net/core/skbuff.c:981 [inline] consume_skb net/core/skbuff.c:1193 [inline] consume_skb+0xdd/0x170 net/core/skbuff.c:1187 packet_rcv+0xee/0x15c0 net/packet/af_packet.c:2229 dev_queue_xmit_nit+0x852/0xba0 net/core/dev.c:2283 xmit_one net/core/dev.c:3574 [inline] dev_hard_start_xmit+0xac/0x9d0 net/core/dev.c:3594 sch_direct_xmit+0x1a3/0xc30 net/sched/sch_generic.c:342 __dev_xmit_skb net/core/dev.c:3805 [inline] __dev_queue_xmit+0x1670/0x3db0 net/core/dev.c:4210 dev_queue_xmit include/linux/netdevice.h:3051 [inline] neigh_hh_output include/net/neighbour.h:530 [inline] neigh_output include/net/neighbour.h:544 [inline] ip_finish_output2+0x15d3/0x22e0 net/ipv4/ip_output.c:228 Memory state around the buggy address: ffff888029db4580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029db4600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888029db4680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888029db4700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029db4780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================