================================================================== BUG: KASAN: use-after-free in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: use-after-free in atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline] BUG: KASAN: use-after-free in __refcount_sub_and_test include/linux/refcount.h:272 [inline] BUG: KASAN: use-after-free in __refcount_dec_and_test include/linux/refcount.h:315 [inline] BUG: KASAN: use-after-free in refcount_dec_and_test include/linux/refcount.h:333 [inline] BUG: KASAN: use-after-free in ax25_dev_put include/net/ax25.h:301 [inline] BUG: KASAN: use-after-free in ax25_dev_device_down+0x354/0x67c net/ax25/ax25_dev.c:122 Write of size 4 at addr ffff0000ce749cb8 by task syz.4.186/4889 CPU: 1 PID: 4889 Comm: syz.4.186 Not tainted 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call trace: dump_backtrace+0x0/0x43c arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf8/0x160 lib/dump_stack.c:106 print_address_description+0x78/0x30c mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xec/0x15c mm/kasan/report.c:451 check_region_inline mm/kasan/generic.c:-1 [inline] kasan_check_range+0x270/0x2b0 mm/kasan/generic.c:189 __kasan_check_write+0x44/0x54 mm/kasan/shadow.c:37 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_sub_release include/linux/atomic/atomic-instrumented.h:167 [inline] __refcount_sub_and_test include/linux/refcount.h:272 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] ax25_dev_put include/net/ax25.h:301 [inline] ax25_dev_device_down+0x354/0x67c net/ax25/ax25_dev.c:122 ax25_device_event+0x538/0x590 net/ax25/af_ax25.c:144 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x2cc/0x440 net/core/dev.c:1650 dev_close+0x148/0x1f8 net/core/dev.c:1672 bpq_device_event+0x318/0x824 drivers/net/hamradio/bpqether.c:548 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x2cc/0x440 net/core/dev.c:1650 dev_close+0x148/0x1f8 net/core/dev.c:1672 bond_setup_by_slave+0x70/0x318 drivers/net/bonding/bond_main.c:1471 bond_enslave+0x624/0x3014 drivers/net/bonding/bond_main.c:1855 bond_do_ioctl+0x6ec/0xb3c drivers/net/bonding/bond_main.c:4238 dev_siocbond net/core/dev_ioctl.c:270 [inline] dev_ifsioc+0xc44/0xef4 net/core/dev_ioctl.c:417 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Allocated by task 4452: 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+0xb0/0xf0 mm/kasan/common.c:522 kasan_kmalloc include/linux/kasan.h:264 [inline] kmem_cache_alloc_trace+0x274/0x3fc mm/slub.c:3247 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:735 [inline] ax25_dev_device_up+0x5c/0x540 net/ax25/ax25_dev.c:55 ax25_device_event+0x504/0x590 net/ax25/af_ax25.c:139 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] __dev_notify_flags+0x250/0x46c net/core/dev.c:-1 dev_change_flags+0xc8/0x154 net/core/dev.c:8929 dev_ifsioc+0x504/0xef4 net/core/dev_ioctl.c:324 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Freed by task 4889: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x84 mm/kasan/common.c:46 kasan_set_free_info+0x28/0x4c mm/kasan/generic.c:360 ____kasan_slab_free+0x118/0x164 mm/kasan/common.c:366 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:374 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:1705 [inline] slab_free_freelist_hook+0x128/0x1e8 mm/slub.c:1731 slab_free mm/slub.c:3499 [inline] kfree+0x170/0x40c mm/slub.c:4559 ax25_dev_put include/net/ax25.h:302 [inline] ax25_dev_device_down+0x1ac/0x67c net/ax25/ax25_dev.c:119 ax25_device_event+0x538/0x590 net/ax25/af_ax25.c:144 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x2cc/0x440 net/core/dev.c:1650 dev_close+0x148/0x1f8 net/core/dev.c:1672 bpq_device_event+0x318/0x824 drivers/net/hamradio/bpqether.c:548 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x2cc/0x440 net/core/dev.c:1650 dev_close+0x148/0x1f8 net/core/dev.c:1672 bond_setup_by_slave+0x70/0x318 drivers/net/bonding/bond_main.c:1471 bond_enslave+0x624/0x3014 drivers/net/bonding/bond_main.c:1855 bond_do_ioctl+0x6ec/0xb3c drivers/net/bonding/bond_main.c:4238 dev_siocbond net/core/dev_ioctl.c:270 [inline] dev_ifsioc+0xc44/0xef4 net/core/dev_ioctl.c:417 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xcc/0x114 mm/kasan/generic.c:348 insert_work+0x64/0x388 kernel/workqueue.c:1366 __queue_work+0xb30/0x1054 kernel/workqueue.c:1532 queue_work_on+0xc4/0x17c 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+0x6ac/0x79c drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_set_mac_address+0x264/0x38c net/core/dev.c:9114 dev_set_mac_address_user+0x44/0x68 net/core/dev.c:9128 do_setlink+0x6a0/0x3088 net/core/rtnetlink.c:2734 __rtnl_newlink net/core/rtnetlink.c:3450 [inline] rtnl_newlink+0x10d0/0x1404 net/core/rtnetlink.c:3572 rtnetlink_rcv_msg+0x9d4/0xd04 net/core/rtnetlink.c:5650 netlink_rcv_skb+0x208/0x3c4 net/netlink/af_netlink.c:2489 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:5668 netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline] netlink_unicast+0x60c/0x89c net/netlink/af_netlink.c:1337 netlink_sendmsg+0x6e8/0x9cc net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:704 [inline] __sock_sendmsg net/socket.c:716 [inline] __sys_sendto+0x2e8/0x3d8 net/socket.c:2063 __do_sys_sendto net/socket.c:2075 [inline] __se_sys_sendto net/socket.c:2071 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2071 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 Second to last potentially related work creation: kasan_save_stack+0x38/0x68 mm/kasan/common.c:38 kasan_record_aux_stack+0xcc/0x114 mm/kasan/generic.c:348 insert_work+0x64/0x388 kernel/workqueue.c:1366 __queue_work+0xb30/0x1054 kernel/workqueue.c:1532 queue_work_on+0xc4/0x17c kernel/workqueue.c:1559 queue_work include/linux/workqueue.h:512 [inline] call_usermodehelper_exec+0x22c/0x478 kernel/umh.c:435 kobject_uevent_env+0x670/0x888 lib/kobject_uevent.c:633 kobject_uevent+0x2c/0x3c lib/kobject_uevent.c:657 driver_register+0x29c/0x374 drivers/base/driver.c:248 usb_register_driver+0x1bc/0x390 drivers/usb/core/driver.c:1061 r8153_ecm_driver_init+0x28/0x34 drivers/net/usb/r8153_ecm.c:166 do_one_initcall+0x228/0x8b0 init/main.c:1302 do_initcall_level+0x154/0x214 init/main.c:1375 do_initcalls+0x58/0xac init/main.c:1391 do_basic_setup+0x8c/0xa0 init/main.c:1410 kernel_init_freeable+0x404/0x5fc init/main.c:1615 kernel_init+0x24/0x1d0 init/main.c:1506 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870 The buggy address belongs to the object at ffff0000ce749c00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 184 bytes inside of 256-byte region [ffff0000ce749c00, ffff0000ce749d00) The buggy address belongs to the page: page:0000000095a6f2dd refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff0000ce748000 pfn:0x10e748 head:0000000095a6f2dd order:1 compound_mapcount:0 flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000010200 fffffc000342ce88 fffffc000340e208 ffff0000c0002480 raw: ffff0000ce748000 000000000010000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000ce749b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ce749c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff0000ce749c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000ce749d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000ce749d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 0 PID: 4889 at lib/refcount.c:28 refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 Modules linked in: CPU: 0 PID: 4889 Comm: syz.4.186 Tainted: G B 5.15.184-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 lr : refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 sp : ffff80001f546ff0 x29: ffff80001f546ff0 x28: ffff8000163b0ae0 x27: 1fffe00019ce9382 x26: ffff80001b1bf000 x25: 1fffe0001aeee46d x24: dfff800000000000 x23: 0000000000000001 x22: ffff0000ce749cb8 x21: 0000000000000007 x20: ffff0000ce749cb8 x19: ffff80001658e000 x18: 0000000000000002 x17: 0000000040000000 x16: ffff8000082d4b38 x15: 0000000000000002 x14: 0000000000ff0100 x13: ffffffffffffffff x12: 0000000000080000 x11: 0000000000062fc8 x10: ffff80002415b000 x9 : a25bbb0bfe8d5200 x8 : a25bbb0bfe8d5200 x7 : 0000000000000000 x6 : ffff80000824408c x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff800008044e7c x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000026 Call trace: refcount_warn_saturate+0x154/0x1f8 lib/refcount.c:28 __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] ax25_dev_put include/net/ax25.h:301 [inline] ax25_dev_device_down+0x528/0x67c net/ax25/ax25_dev.c:-1 ax25_device_event+0x538/0x590 net/ax25/af_ax25.c:144 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x2cc/0x440 net/core/dev.c:1650 dev_close+0x148/0x1f8 net/core/dev.c:1672 bpq_device_event+0x318/0x824 drivers/net/hamradio/bpqether.c:548 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd4/0x164 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2049 [inline] call_netdevice_notifiers_extack net/core/dev.c:2061 [inline] call_netdevice_notifiers net/core/dev.c:2075 [inline] dev_close_many+0x2cc/0x440 net/core/dev.c:1650 dev_close+0x148/0x1f8 net/core/dev.c:1672 bond_setup_by_slave+0x70/0x318 drivers/net/bonding/bond_main.c:1471 bond_enslave+0x624/0x3014 drivers/net/bonding/bond_main.c:1855 bond_do_ioctl+0x6ec/0xb3c drivers/net/bonding/bond_main.c:4238 dev_siocbond net/core/dev_ioctl.c:270 [inline] dev_ifsioc+0xc44/0xef4 net/core/dev_ioctl.c:417 dev_ioctl+0x4d0/0xc94 net/core/dev_ioctl.c:587 sock_do_ioctl+0x18c/0x240 net/socket.c:1154 sock_ioctl+0x5c8/0x87c net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl fs/ioctl.c:860 [inline] __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:860 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181 el0_svc+0x78/0x1e0 arch/arm64/kernel/entry-common.c:608 el0t_64_sync_handler+0xcc/0xe4 arch/arm64/kernel/entry-common.c:626 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584 irq event stamp: 6402 hardirqs last enabled at (6401): [] kasan_quarantine_put+0xc4/0x204 mm/kasan/quarantine.c:231 hardirqs last disabled at (6402): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (6402): [] _raw_spin_lock_irqsave+0xfc/0x14c kernel/locking/spinlock.c:162 softirqs last enabled at (6396): [] spin_unlock_bh include/linux/spinlock.h:408 [inline] softirqs last enabled at (6396): [] ax25_dev_device_down+0x160/0x67c net/ax25/ax25_dev.c:118 softirqs last disabled at (6394): [] spin_lock_bh include/linux/spinlock.h:368 [inline] softirqs last disabled at (6394): [] ax25_dev_device_down+0x64/0x67c net/ax25/ax25_dev.c:103 ---[ end trace f6cecf192b06a614 ]--- 8021q: adding VLAN 0 to HW filter on device bond0 bond0: (slave rose0): Enslaving as an active interface with an up link