================================================================== BUG: KASAN: slab-use-after-free in rose_send_frame+0x270/0x2a0 net/rose/rose_link.c:101 Read of size 8 at addr ffff88802cea1020 by task syz.6.3643/17077 CPU: 0 UID: 0 PID: 17077 Comm: syz.6.3643 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1d0 mm/kasan/report.c:595 rose_send_frame+0x270/0x2a0 net/rose/rose_link.c:101 rose_transmit_restart_request+0x1b8/0x250 net/rose/rose_link.c:198 rose_t0timer_expiry+0x1d/0x150 net/rose/rose_link.c:83 call_timer_fn+0x19a/0x640 kernel/time/timer.c:1748 expire_timers kernel/time/timer.c:1799 [inline] __run_timers+0x75f/0xaf0 kernel/time/timer.c:2374 __run_timer_base kernel/time/timer.c:2386 [inline] __run_timer_base kernel/time/timer.c:2378 [inline] run_timer_base+0x114/0x190 kernel/time/timer.c:2395 run_timer_softirq+0x1a/0x50 kernel/time/timer.c:2405 handle_softirqs+0x1ea/0xa00 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0x56/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 RIP: 0033:0x7f0575270e6d Code: 7c 24 08 85 c0 0f 84 10 01 00 00 66 90 48 8b 3c 24 49 8b 54 24 40 4c 89 f0 4a 03 14 ef 80 3d 41 6f 3a 00 00 49 89 d6 48 89 d3 <74> 28 25 ff 0f 00 00 83 f0 3d 8d 04 c0 89 c3 c1 eb 04 31 c3 69 db RSP: 002b:00007ffd4b9f8620 EFLAGS: 00000246 RAX: ffffffff84baa48d RBX: ffffffff84baa49a RCX: ffffffff84baa48d RDX: ffffffff84baa49a RSI: ffffffff84baa48d RDI: 00007f0574dff008 RBP: 0000000000000000 R08: 00007f0575600000 R09: 00007f0575602000 R10: 0000000084baa491 R11: 0000000000000013 R12: 00007f0575616038 R13: 000000000000f4ed R14: ffffffff84baa49a R15: 00007f0576145720 Allocated by task 10125: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kmalloc_noprof include/linux/slab.h:950 [inline] rose_add_node net/rose/rose_route.c:85 [inline] rose_rt_ioctl+0x586/0x2550 net/rose/rose_route.c:748 rose_ioctl+0x491/0x7d0 net/rose/af_rose.c:1387 sock_do_ioctl+0x118/0x280 net/socket.c:1313 sock_ioctl+0x599/0x6b0 net/socket.c:1434 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:597 [inline] __se_sys_ioctl fs/ioctl.c:583 [inline] __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 0: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2689 [inline] slab_free mm/slub.c:6246 [inline] kfree+0x223/0x6c0 mm/slub.c:6561 rose_neigh_put include/net/rose.h:166 [inline] rose_timer_expiry+0x53f/0x630 net/rose/rose_timer.c:183 call_timer_fn+0x19a/0x640 kernel/time/timer.c:1748 expire_timers kernel/time/timer.c:1799 [inline] __run_timers+0x75f/0xaf0 kernel/time/timer.c:2374 __run_timer_base kernel/time/timer.c:2386 [inline] __run_timer_base kernel/time/timer.c:2378 [inline] run_timer_base+0x114/0x190 kernel/time/timer.c:2395 run_timer_softirq+0x1a/0x50 kernel/time/timer.c:2405 handle_softirqs+0x1ea/0xa00 kernel/softirq.c:622 __do_softirq kernel/softirq.c:656 [inline] invoke_softirq kernel/softirq.c:496 [inline] __irq_exit_rcu+0x162/0x210 kernel/softirq.c:735 irq_exit_rcu+0x9/0x30 kernel/softirq.c:752 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1061 [inline] sysvec_apic_timer_interrupt+0xa3/0xc0 arch/x86/kernel/apic/apic.c:1061 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 The buggy address belongs to the object at ffff88802cea1000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 32 bytes inside of freed 512-byte region [ffff88802cea1000, ffff88802cea1200) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88802cea3400 pfn:0x2cea0 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801b842c80 ffffea0001732310 ffffea0001026710 raw: ffff88802cea3400 000000080010000e 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801b842c80 ffffea0001732310 ffffea0001026710 head: ffff88802cea3400 000000080010000e 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5948, tgid 5948 (syz-executor), ts 64575471399, free_ts 64490616957 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x153/0x170 mm/page_alloc.c:1858 prep_new_page mm/page_alloc.c:1866 [inline] get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5226 alloc_slab_page mm/slub.c:3278 [inline] allocate_slab mm/slub.c:3467 [inline] new_slab+0xa6/0x6c0 mm/slub.c:3525 refill_objects+0x277/0x420 mm/slub.c:7251 refill_sheaf mm/slub.c:2816 [inline] __pcs_replace_empty_main+0x375/0x650 mm/slub.c:4651 alloc_from_pcs mm/slub.c:4749 [inline] slab_alloc_node mm/slub.c:4883 [inline] __kmalloc_cache_noprof+0x493/0x6f0 mm/slub.c:5410 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] device_private_init drivers/base/core.c:3536 [inline] device_add+0xd3a/0x1950 drivers/base/core.c:3587 device_create_groups_vargs+0x1f8/0x270 drivers/base/core.c:4388 device_create+0xed/0x130 drivers/base/core.c:4427 mac80211_hwsim_new_radio+0x379/0x5ae0 drivers/net/wireless/virtual/mac80211_hwsim.c:5624 hwsim_new_radio_nl+0xc5f/0x1370 drivers/net/wireless/virtual/mac80211_hwsim.c:6726 genl_family_rcv_msg_doit+0x214/0x300 net/netlink/genetlink.c:1114 genl_family_rcv_msg net/netlink/genetlink.c:1194 [inline] genl_rcv_msg+0x560/0x800 net/netlink/genetlink.c:1209 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2550 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1218 page last free pid 5957 tgid 5957 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1402 [inline] __free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2943 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4569 [inline] slab_alloc_node mm/slub.c:4898 [inline] __kmalloc_cache_noprof+0x243/0x6f0 mm/slub.c:5410 kmalloc_noprof include/linux/slab.h:950 [inline] kzalloc_noprof include/linux/slab.h:1188 [inline] mca_alloc net/ipv6/mcast.c:871 [inline] __ipv6_dev_mc_inc+0x2f1/0xbc0 net/ipv6/mcast.c:961 ipv6_add_dev+0xb78/0x1520 net/ipv6/addrconf.c:472 addrconf_notify+0x5db/0x1ba0 net/ipv6/addrconf.c:3662 notifier_call_chain+0x99/0x400 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2249 call_netdevice_notifiers_extack net/core/dev.c:2287 [inline] call_netdevice_notifiers net/core/dev.c:2301 [inline] register_netdevice+0x16e6/0x2210 net/core/dev.c:11508 cfg80211_register_netdevice+0x149/0x310 net/wireless/core.c:1635 ieee80211_if_add+0x103d/0x1920 net/mac80211/iface.c:2417 ieee80211_register_hw+0x3c42/0x4570 net/mac80211/main.c:1641 mac80211_hwsim_new_radio+0x2a01/0x5ae0 drivers/net/wireless/virtual/mac80211_hwsim.c:6019 hwsim_new_radio_nl+0xc5f/0x1370 drivers/net/wireless/virtual/mac80211_hwsim.c:6726 Memory state around the buggy address: ffff88802cea0f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802cea0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802cea1000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802cea1080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802cea1100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================