================================================================== BUG: KASAN: use-after-free in ax25_fillin_cb_from_dev net/ax25/af_ax25.c:468 [inline] BUG: KASAN: use-after-free in ax25_fillin_cb+0x459/0x640 net/ax25/af_ax25.c:495 Read of size 4 at addr ffff88802234d538 by task syz.6.68/4907 CPU: 1 PID: 4907 Comm: syz.6.68 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 ax25_fillin_cb_from_dev net/ax25/af_ax25.c:468 [inline] ax25_fillin_cb+0x459/0x640 net/ax25/af_ax25.c:495 ax25_setsockopt+0x8a2/0xa40 net/ax25/af_ax25.c:690 __sys_setsockopt+0x3d6/0x5e0 net/socket.c:2203 __do_sys_setsockopt net/socket.c:2214 [inline] __se_sys_setsockopt net/socket.c:2211 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2211 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fb424509969 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb422350038 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fb424731080 RCX: 00007fb424509969 RDX: 0000000000000019 RSI: 0000000000000101 RDI: 000000000000000b RBP: 00007fb42458bab1 R08: 0000000000000010 R09: 0000000000000000 R10: 00002000000001c0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fb424731080 R15: 00007ffed233b3d8 Allocated by task 4482: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc+0xb5/0xf0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:604 [inline] addr_event+0xc3/0x460 drivers/infiniband/core/roce_gid_mgmt.c:840 inetaddr_event+0xe0/0x140 drivers/infiniband/core/roce_gid_mgmt.c:869 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x103/0x1b0 kernel/notifier.c:318 __inet_insert_ifa+0x9e9/0xbc0 net/ipv4/devinet.c:568 inet_rtm_newaddr+0x940/0x1800 net/ipv4/devinet.c:967 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x423/0x580 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x9c5/0xd50 kernel/workqueue.c:1532 queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1559 inetaddr_event+0xe0/0x140 drivers/infiniband/core/roce_gid_mgmt.c:869 notifier_call_chain kernel/notifier.c:83 [inline] blocking_notifier_call_chain+0x103/0x1b0 kernel/notifier.c:318 __inet_insert_ifa+0x9e9/0xbc0 net/ipv4/devinet.c:568 inet_rtm_newaddr+0x940/0x1800 net/ipv4/devinet.c:967 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x423/0x580 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 Second to last potentially related work creation: kasan_save_stack+0x35/0x60 mm/kasan/common.c:38 kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348 insert_work+0x54/0x3d0 kernel/workqueue.c:1366 __queue_work+0x9c5/0xd50 kernel/workqueue.c:1532 queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:659 [inline] netdevice_event+0x803/0x900 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391 __netdev_upper_dev_link+0x3c0/0x580 net/core/dev.c:8199 netdev_upper_dev_link+0x9a/0xe0 net/core/dev.c:8240 macvlan_common_newlink+0x1098/0x17e0 drivers/net/macvlan.c:1505 __rtnl_newlink net/core/rtnetlink.c:3524 [inline] rtnl_newlink+0x114c/0x17d0 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9b9/0xe60 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337 netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x423/0x580 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2071 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 The buggy address belongs to the object at ffff88802234d500 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 56 bytes inside of 192-byte region [ffff88802234d500, ffff88802234d5c0) The buggy address belongs to the page: page:ffffea000088d340 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88802234d500 pfn:0x2234d flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00006bfc48 ffffea0001f53e88 ffff888016841a00 raw: ffff88802234d500 000000000010000f 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 0x12c00(GFP_NOIO|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 12148184493, free_ts 9893103777 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192 __alloc_pages+0x1e1/0x470 mm/page_alloc.c:5466 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2031 alloc_slab_page mm/slub.c:1775 [inline] allocate_slab mm/slub.c:1912 [inline] new_slab+0xc0/0x4b0 mm/slub.c:1975 ___slab_alloc+0x81e/0xdf0 mm/slub.c:3008 __slab_alloc mm/slub.c:3095 [inline] slab_alloc_node mm/slub.c:3186 [inline] slab_alloc mm/slub.c:3228 [inline] __kmalloc+0x1cd/0x330 mm/slub.c:4403 kmalloc include/linux/slab.h:609 [inline] usb_alloc_urb+0x3f/0x140 drivers/usb/core/urb.c:74 usb_internal_control_msg drivers/usb/core/message.c:95 [inline] usb_control_msg+0x115/0x3e0 drivers/usb/core/message.c:153 usb_get_status+0xe3/0x290 drivers/usb/core/message.c:1147 usb_get_std_status include/linux/usb.h:1834 [inline] hub_configure drivers/usb/core/hub.c:1585 [inline] hub_probe+0x1b92/0x34c0 drivers/usb/core/hub.c:1923 usb_probe_interface+0x5a0/0xaf0 drivers/usb/core/driver.c:396 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x284/0xc80 drivers/base/dd.c:595 __driver_probe_device+0x18c/0x330 drivers/base/dd.c:755 driver_probe_device+0x4f/0x420 drivers/base/dd.c:785 __device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907 bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x122/0x7e0 mm/page_alloc.c:3433 release_pages+0x184b/0x1bb0 mm/swap.c:963 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:240 [inline] tlb_flush_mmu mm/mmu_gather.c:247 [inline] tlb_finish_mmu+0x164/0x2e0 mm/mmu_gather.c:338 exit_mmap+0x3a6/0x5f0 mm/mmap.c:3206 __mmput+0x115/0x3b0 kernel/fork.c:1127 free_bprm+0x141/0x300 fs/exec.c:1494 kernel_execve+0x380/0x900 fs/exec.c:2015 call_usermodehelper_exec_async+0x207/0x350 kernel/umh.c:112 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 Memory state around the buggy address: ffff88802234d400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802234d480: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802234d500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802234d580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88802234d600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================