================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline] BUG: KASAN: use-after-free in queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock include/linux/spinlock.h:183 [inline] BUG: KASAN: use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] BUG: KASAN: use-after-free in _raw_spin_lock_bh+0x97/0x1b0 kernel/locking/spinlock.c:175 Write of size 4 at addr ffff88810e9dad08 by task kworker/0:3/303 CPU: 0 PID: 303 Comm: kworker/0:3 Not tainted 5.10.222-syzkaller-1003210-gfd58936f3c1f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Workqueue: vsock-loopback vsock_loopback_work Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack_lvl+0x1e2/0x24b lib/dump_stack.c:118 print_address_description+0x81/0x3b0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:435 [inline] kasan_report+0x179/0x1c0 mm/kasan/report.c:452 kasan_check_range+0x293/0x2a0 mm/kasan/generic.c:189 __kasan_check_write+0x14/0x20 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_try_cmpxchg_acquire include/asm-generic/atomic-instrumented.h:705 [inline] queued_spin_lock include/asm-generic/qspinlock.h:82 [inline] do_raw_spin_lock include/linux/spinlock.h:183 [inline] __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] _raw_spin_lock_bh+0x97/0x1b0 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:359 [inline] virtio_transport_space_update net/vmw_vsock/virtio_transport_common.c:1040 [inline] virtio_transport_recv_pkt+0x665/0x4130 net/vmw_vsock/virtio_transport_common.c:1164 vsock_loopback_work+0x37d/0x3f0 net/vmw_vsock/vsock_loopback.c:125 process_one_work+0x6dc/0xbd0 kernel/workqueue.c:2301 worker_thread+0xaea/0x1510 kernel/workqueue.c:2447 kthread+0x34b/0x3d0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 380: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:430 [inline] ____kasan_kmalloc+0xdb/0x110 mm/kasan/common.c:509 __kasan_kmalloc+0x9/0x10 mm/kasan/common.c:518 kasan_kmalloc include/linux/kasan.h:254 [inline] kmem_cache_alloc_trace+0x18a/0x2e0 mm/slub.c:2974 kmalloc include/linux/slab.h:552 [inline] kzalloc include/linux/slab.h:664 [inline] virtio_transport_do_socket_init+0x56/0x2d0 net/vmw_vsock/virtio_transport_common.c:475 vsock_assign_transport+0x324/0x3f0 net/vmw_vsock/af_vsock.c:470 vsock_stream_connect+0x5cf/0xd30 net/vmw_vsock/af_vsock.c:1297 __sys_connect_file net/socket.c:1866 [inline] __sys_connect+0x388/0x410 net/socket.c:1883 __do_sys_connect net/socket.c:1893 [inline] __se_sys_connect net/socket.c:1890 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:1890 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb Freed by task 382: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4b/0x70 mm/kasan/common.c:45 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x121/0x160 mm/kasan/common.c:362 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:370 kasan_slab_free include/linux/kasan.h:220 [inline] slab_free_hook mm/slub.c:1595 [inline] slab_free_freelist_hook+0xc0/0x190 mm/slub.c:1621 slab_free mm/slub.c:3203 [inline] kfree+0xc3/0x270 mm/slub.c:4191 virtio_transport_destruct+0x3b/0x40 net/vmw_vsock/virtio_transport_common.c:693 vsock_deassign_transport net/vmw_vsock/af_vsock.c:411 [inline] vsock_assign_transport+0x266/0x3f0 net/vmw_vsock/af_vsock.c:461 vsock_stream_connect+0x5cf/0xd30 net/vmw_vsock/af_vsock.c:1297 __sys_connect_file net/socket.c:1866 [inline] __sys_connect+0x388/0x410 net/socket.c:1883 __do_sys_connect net/socket.c:1893 [inline] __se_sys_connect net/socket.c:1890 [inline] __x64_sys_connect+0x7a/0x90 net/socket.c:1890 do_syscall_64+0x34/0x70 entry_SYSCALL_64_after_hwframe+0x61/0xcb The buggy address belongs to the object at ffff88810e9dad00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 8 bytes inside of 64-byte region [ffff88810e9dad00, ffff88810e9dad40) The buggy address belongs to the page: page:ffffea00043a7680 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10e9da flags: 0x4000000000000200(slab) raw: 4000000000000200 dead000000000100 dead000000000122 ffff888100043800 raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 357, ts 49562409151, free_ts 49219541729 set_page_owner include/linux/page_owner.h:35 [inline] post_alloc_hook mm/page_alloc.c:2456 [inline] prep_new_page+0x166/0x180 mm/page_alloc.c:2462 get_page_from_freelist+0x2d8c/0x2f30 mm/page_alloc.c:4254 __alloc_pages_nodemask+0x435/0xaf0 mm/page_alloc.c:5348 allocate_slab mm/slub.c:1808 [inline] new_slab+0x80/0x400 mm/slub.c:1869 new_slab_objects mm/slub.c:2627 [inline] ___slab_alloc+0x302/0x4b0 mm/slub.c:2791 __slab_alloc+0x63/0xa0 mm/slub.c:2831 slab_alloc_node mm/slub.c:2913 [inline] slab_alloc mm/slub.c:2955 [inline] __kmalloc+0x204/0x330 mm/slub.c:4029 kmalloc include/linux/slab.h:557 [inline] kzalloc include/linux/slab.h:664 [inline] tnode_alloc net/ipv4/fib_trie.c:331 [inline] tnode_new net/ipv4/fib_trie.c:384 [inline] inflate net/ipv4/fib_trie.c:598 [inline] resize+0xa47/0x25c0 net/ipv4/fib_trie.c:868 trie_rebalance net/ipv4/fib_trie.c:1059 [inline] fib_insert_node net/ipv4/fib_trie.c:1103 [inline] fib_insert_alias+0xaab/0xf80 net/ipv4/fib_trie.c:1117 fib_table_insert+0x82c/0x1eb0 net/ipv4/fib_trie.c:1328 fib_magic net/ipv4/fib_frontend.c:1093 [inline] fib_add_ifaddr+0x42c/0x1a40 net/ipv4/fib_frontend.c:1115 fib_inetaddr_event+0x159/0x310 net/ipv4/fib_frontend.c:1431 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0xbb/0x140 kernel/notifier.c:337 __inet_insert_ifa+0x906/0xb50 net/ipv4/devinet.c:553 inet_rtm_newaddr+0x8f5/0x16c0 net/ipv4/devinet.c:957 rtnetlink_rcv_msg+0x955/0xc50 net/core/rtnetlink.c:5607 page last free stack trace: reset_page_owner include/linux/page_owner.h:28 [inline] free_pages_prepare mm/page_alloc.c:1349 [inline] __free_pages_ok+0x82c/0x850 mm/page_alloc.c:1629 free_the_page+0x76/0x370 mm/page_alloc.c:5409 __free_pages+0x67/0xc0 mm/page_alloc.c:5418 __free_slab+0xcf/0x190 mm/slub.c:1894 free_slab mm/slub.c:1909 [inline] discard_slab mm/slub.c:1915 [inline] unfreeze_partials+0x15e/0x190 mm/slub.c:2410 put_cpu_partial+0xbf/0x180 mm/slub.c:2446 __slab_free+0x2c8/0x3a0 mm/slub.c:3095 do_slab_free mm/slub.c:3191 [inline] ___cache_free+0x111/0x130 mm/slub.c:3210 qlink_free+0x50/0x90 mm/kasan/quarantine.c:157 qlist_free_all+0x47/0xb0 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x15a/0x170 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0x2f/0xe0 mm/kasan/common.c:440 kasan_slab_alloc include/linux/kasan.h:244 [inline] slab_post_alloc_hook+0x61/0x2f0 mm/slab.h:583 slab_alloc_node mm/slub.c:2947 [inline] slab_alloc mm/slub.c:2955 [inline] kmem_cache_alloc+0x168/0x2e0 mm/slub.c:2960 kmem_cache_alloc_node include/linux/slab.h:423 [inline] __alloc_skb+0x80/0x510 net/core/skbuff.c:200 alloc_skb include/linux/skbuff.h:1126 [inline] nlmsg_new include/net/netlink.h:953 [inline] rtmsg_ifinfo_build_skb+0x7f/0x180 net/core/rtnetlink.c:3841 Memory state around the buggy address: ffff88810e9dac00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88810e9dac80: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff88810e9dad00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88810e9dad80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff88810e9dae00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================