================================================================== BUG: KASAN: slab-use-after-free in rose_link_up net/rose/rose_link.c:124 [inline] BUG: KASAN: slab-use-after-free in rose_transmit_link+0xe0/0xac0 net/rose/rose_link.c:271 Read of size 8 at addr ffff888046300478 by task syz.4.3980/21395 CPU: 1 UID: 0 PID: 21395 Comm: syz.4.3980 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xba/0x230 mm/kasan/report.c:482 kasan_report+0x117/0x150 mm/kasan/report.c:595 rose_link_up net/rose/rose_link.c:124 [inline] rose_transmit_link+0xe0/0xac0 net/rose/rose_link.c:271 rose_write_internal+0x1256/0x1b60 net/rose/rose_subr.c:198 rose_release+0x25b/0x510 net/rose/af_rose.c:671 __sock_release net/socket.c:656 [inline] sock_close+0xc3/0x240 net/socket.c:1448 __fput+0x44f/0xa70 fs/file_table.c:469 task_work_run+0x1d9/0x270 kernel/task_work.c:233 get_signal+0x11eb/0x1330 kernel/signal.c:2807 arch_do_signal_or_restart+0xbc/0x830 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:64 [inline] exit_to_user_mode_loop+0x86/0x480 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:325 [inline] do_syscall_64+0x32d/0xf80 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcf5879c799 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcf596bb028 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: fffffffffffffe00 RBX: 00007fcf58a16090 RCX: 00007fcf5879c799 RDX: 0000000000000040 RSI: 00002000000000c0 RDI: 000000000000000a RBP: 00007fcf58832c99 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fcf58a16128 R14: 00007fcf58a16090 R15: 00007ffed0039fb8 Allocated by task 5492: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5260 [inline] __kvmalloc_node_noprof+0x528/0x8a0 mm/slub.c:6752 alloc_netdev_mqs+0xa6/0x11b0 net/core/dev.c:12060 bpq_new_device drivers/net/hamradio/bpqether.c:467 [inline] bpq_device_event+0x413/0x6a0 drivers/net/hamradio/bpqether.c:523 notifier_call_chain+0x1be/0x400 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2288 [inline] call_netdevice_notifiers net/core/dev.c:2302 [inline] __dev_notify_flags+0x1a9/0x310 net/core/dev.c:9833 netif_change_flags+0xe8/0x1a0 net/core/dev.c:9862 dev_change_flags+0x130/0x260 net/core/dev_api.c:68 devinet_ioctl+0x9f2/0x1b30 net/ipv4/devinet.c:1199 inet_ioctl+0x42a/0x560 net/ipv4/af_inet.c:1011 sock_do_ioctl+0x101/0x320 net/socket.c:1247 sock_ioctl+0x5c6/0x7f0 net/socket.c:1368 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 16508: kasan_save_stack mm/kasan/common.c:57 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:78 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2685 [inline] slab_free mm/slub.c:6165 [inline] kfree+0x1c1/0x630 mm/slub.c:6483 device_release+0xc4/0x1f0 drivers/base/core.c:-1 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x228/0x560 lib/kobject.c:737 netdev_run_todo+0xc75/0xde0 net/core/dev.c:11761 rtnl_net_unlock include/linux/rtnetlink.h:135 [inline] rtnl_net_dev_unlock net/core/dev.c:2180 [inline] unregister_netdev+0x191/0x200 net/core/dev.c:12526 bnep_session+0x29d1/0x2c00 net/bluetooth/bnep/core.c:525 kthread+0x388/0x470 kernel/kthread.c:436 ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888046300000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 1144 bytes inside of freed 4096-byte region [ffff888046300000, ffff888046301000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x46300 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888046301011 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88813fe02500 dead000000000100 dead000000000122 raw: 0000000000000000 0000200000040004 00000000f5000000 ffff888046301011 head: 00fff00000000040 ffff88813fe02500 dead000000000100 dead000000000122 head: 0000000000000000 0000200000040004 00000000f5000000 ffff888046301011 head: 00fff00000000003 ffffea000118c001 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 13164, tgid 13154 (syz.4.1860), ts 297740241826, free_ts 297156365167 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x231/0x280 mm/page_alloc.c:1889 prep_new_page mm/page_alloc.c:1897 [inline] get_page_from_freelist+0x24dc/0x2580 mm/page_alloc.c:3962 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5250 alloc_slab_page mm/slub.c:3292 [inline] allocate_slab+0x77/0x660 mm/slub.c:3481 new_slab mm/slub.c:3539 [inline] refill_objects+0x331/0x3c0 mm/slub.c:7175 refill_sheaf mm/slub.c:2812 [inline] __pcs_replace_empty_main+0x2e6/0x730 mm/slub.c:4615 alloc_from_pcs mm/slub.c:4717 [inline] slab_alloc_node mm/slub.c:4851 [inline] __do_kmalloc_node mm/slub.c:5259 [inline] __kvmalloc_node_noprof+0x657/0x8a0 mm/slub.c:6752 bpf_stack_liveness_init+0x29/0x90 kernel/bpf/liveness.c:220 bpf_check+0x217d/0x1ce00 kernel/bpf/verifier.c:26053 bpf_prog_load+0x1484/0x1ae0 kernel/bpf/syscall.c:3089 __sys_bpf+0x618/0x950 kernel/bpf/syscall.c:6228 __do_sys_bpf kernel/bpf/syscall.c:6341 [inline] __se_sys_bpf kernel/bpf/syscall.c:6339 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:6339 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5814 tgid 5814 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1433 [inline] __free_frozen_pages+0xc2b/0xdb0 mm/page_alloc.c:2978 __folio_put+0x414/0x4f0 mm/swap.c:112 put_netmem include/net/netmem.h:384 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x4cb/0x940 net/core/skbuff.c:1111 skb_release_all net/core/skbuff.c:1192 [inline] __kfree_skb+0x5d/0x210 net/core/skbuff.c:1206 skb_defer_free_flush+0x191/0x260 net/core/dev.c:6849 net_rx_action+0x455/0xf70 net/core/dev.c:7922 handle_softirqs+0x22a/0x870 kernel/softirq.c:622 do_softirq+0x76/0xd0 kernel/softirq.c:523 __local_bh_enable_ip+0xf8/0x130 kernel/softirq.c:450 lock_sock include/net/sock.h:1713 [inline] tcp_sendmsg+0x21/0x50 net/ipv4/tcp.c:1464 sock_sendmsg_nosec net/socket.c:721 [inline] __sock_sendmsg net/socket.c:736 [inline] sock_write_iter+0x406/0x4f0 net/socket.c:1188 new_sync_write fs/read_write.c:595 [inline] vfs_write+0x61d/0xb90 fs/read_write.c:688 ksys_write+0x150/0x270 fs/read_write.c:740 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff888046300300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888046300380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888046300400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888046300480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888046300500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================