==================================================================
BUG: KASAN: slab-use-after-free in advance_sched+0xc20/0xca0 net/sched/sch_taprio.c:942
Read of size 8 at addr ffff888077ee7510 by task syz-executor.3/11191
CPU: 1 PID: 11191 Comm: syz-executor.3 Not tainted 6.8.0-syzkaller-08073-g480e035fc4c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
advance_sched+0xc20/0xca0 net/sched/sch_taprio.c:942
__run_hrtimer kernel/time/hrtimer.c:1692 [inline]
__hrtimer_run_queues+0x595/0xd00 kernel/time/hrtimer.c:1756
hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1818
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x107/0x3a0 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x52/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:unwind_next_frame+0x1a6c/0x2a00 arch/x86/kernel/unwind_orc.c:648
Code: 24 48 89 ee 4c 89 f2 e8 02 13 00 00 84 c0 0f 84 84 00 00 00 e8 85 4b 54 00 49 89 df 48 8b 2c 24 e9 f2 02 00 00 48 8b 7c 24 18 <48> 8d 5f 02 48 83 c7 03 48 89 d8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffc90000a08348 EFLAGS: 00000246
RAX: 0000000000000102 RBX: 0000000000000001 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff8dfa08a0 RDI: ffffffff9015c958
RBP: ffffffff9015c95c R08: 0000000000000005 R09: ffffffff8140a8df
R10: 0000000000000003 R11: ffff888023219e00 R12: ffffc90003aaf370
R13: dffffc0000000000 R14: ffffc90000a08470 R15: 1ffff92000141084
arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3798 [inline]
slab_alloc_node mm/slub.c:3845 [inline]
kmem_cache_alloc_node+0x194/0x380 mm/slub.c:3888
__alloc_skb+0x1c3/0x440 net/core/skbuff.c:658
__netdev_alloc_skb+0x105/0x560 net/core/skbuff.c:732
netdev_alloc_skb include/linux/skbuff.h:3306 [inline]
dev_alloc_skb include/linux/skbuff.h:3319 [inline]
__ieee80211_beacon_get+0x998/0x15c0 net/mac80211/tx.c:5466
ieee80211_beacon_get_tim+0xb4/0x320 net/mac80211/tx.c:5588
ieee80211_beacon_get include/net/mac80211.h:5552 [inline]
mac80211_hwsim_beacon_tx+0x398/0x7e0 drivers/net/wireless/virtual/mac80211_hwsim.c:2296
__iterate_interfaces+0x223/0x4c0 net/mac80211/util.c:772
ieee80211_iterate_active_interfaces_atomic+0xd8/0x170 net/mac80211/util.c:808
mac80211_hwsim_beacon+0xd4/0x1f0 drivers/net/wireless/virtual/mac80211_hwsim.c:2326
__run_hrtimer kernel/time/hrtimer.c:1692 [inline]
__hrtimer_run_queues+0x595/0xd00 kernel/time/hrtimer.c:1756
hrtimer_run_softirq+0x19a/0x2c0 kernel/time/hrtimer.c:1773
__do_softirq+0x2bc/0x943 kernel/softirq.c:554
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633
irq_exit_rcu+0x9/0x30 kernel/softirq.c:645
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_acquire+0x25b/0x530 kernel/locking/lockdep.c:5758
Code: 2b 00 74 08 4c 89 f7 e8 d3 a8 86 00 f6 44 24 61 02 0f 85 8e 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc90003aaf1e0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000755e48 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8baad360 RDI: ffffffff8bfed360
RBP: ffffc90003aaf330 R08: ffffffff92ce1507 R09: 1ffffffff259c2a0
R10: dffffc0000000000 R11: fffffbfff259c2a1 R12: 1ffff92000755e44
R13: dffffc0000000000 R14: ffffc90003aaf240 R15: 0000000000000246
rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
rcu_read_lock include/linux/rcupdate.h:750 [inline]
page_ext_get+0x3d/0x2a0 mm/page_ext.c:508
page_table_check_clear+0x59/0x730 mm/page_table_check.c:72
zap_pte_range mm/memory.c:1452 [inline]
zap_pmd_range mm/memory.c:1597 [inline]
zap_pud_range mm/memory.c:1626 [inline]
zap_p4d_range mm/memory.c:1647 [inline]
unmap_page_range+0x1f7a/0x3610 mm/memory.c:1668
unmap_vmas+0x3cc/0x5f0 mm/memory.c:1758
exit_mmap+0x2c6/0xd40 mm/mmap.c:3287
__mmput+0x115/0x3c0 kernel/fork.c:1345
exit_mm+0x220/0x310 kernel/exit.c:569
do_exit+0x99e/0x27e0 kernel/exit.c:865
do_group_exit+0x207/0x2c0 kernel/exit.c:1027
get_signal+0x176e/0x1850 kernel/signal.c:2907
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:105 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline]
syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:212
do_syscall_64+0x10a/0x240 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f135827dda9
Code: Unable to access opcode bytes at 0x7f135827dd7f.
RSP: 002b:00007f1358fec178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f13583abf88 RCX: 00007f135827dda9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f13583abf88
RBP: 00007f13583abf80 R08: 00007f1358fec6c0 R09: 00007f1358fec6c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f13583abf8c
R13: 000000000000000b R14: 00007f13584cf960 R15: 00007f13584cfa48
Allocated by task 11103:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387
kasan_kmalloc include/linux/kasan.h:211 [inline]
kmalloc_trace+0x1db/0x360 mm/slub.c:3997
kmalloc include/linux/slab.h:628 [inline]
kzalloc include/linux/slab.h:749 [inline]
taprio_change+0x1030/0x42d0 net/sched/sch_taprio.c:1861
qdisc_change net/sched/sch_api.c:1416 [inline]
tc_modify_qdisc+0x190d/0x1e40 net/sched/sch_api.c:1746
rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559
netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
netlink_sendmsg+0x8e1/0xcb0 net/netlink/af_netlink.c:1905
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
Freed by task 18201:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579
poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240
__kasan_slab_free+0x37/0x60 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2106 [inline]
slab_free mm/slub.c:4280 [inline]
kfree+0x14a/0x380 mm/slub.c:4390
rcu_do_batch kernel/rcu/tree.c:2196 [inline]
rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2471
__do_softirq+0x2bc/0x943 kernel/softirq.c:554
Last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47
__kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:541
__call_rcu_common kernel/rcu/tree.c:2734 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2838
taprio_change+0x32d9/0x42d0 net/sched/sch_taprio.c:1971
qdisc_change net/sched/sch_api.c:1416 [inline]
tc_modify_qdisc+0x190d/0x1e40 net/sched/sch_api.c:1746
rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595
netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559
netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
netlink_sendmsg+0x8e1/0xcb0 net/netlink/af_netlink.c:1905
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0x221/0x270 net/socket.c:745
____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
___sys_sendmsg net/socket.c:2638 [inline]
__sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
The buggy address belongs to the object at ffff888077ee7400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 272 bytes inside of
freed 512-byte region [ffff888077ee7400, ffff888077ee7600)
The buggy address belongs to the physical page:
page:ffffea0001dfb900 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888077ee4c00 pfn:0x77ee4
head:ffffea0001dfb900 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000a40(workingset|slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000a40 ffff888014c41c80 ffffea0001fd6810 ffffea0000bb6f10
raw: ffff888077ee4c00 000000000010000e 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5104, tgid 5104 (syz-executor.0), ts 103846962528, free_ts 103790503368
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533
prep_new_page mm/page_alloc.c:1540 [inline]
get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311
__alloc_pages+0x256/0x680 mm/page_alloc.c:4569
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page+0x5f/0x160 mm/slub.c:2175
allocate_slab mm/slub.c:2338 [inline]
new_slab+0x84/0x2f0 mm/slub.c:2391
___slab_alloc+0xc73/0x1260 mm/slub.c:3525
__slab_alloc mm/slub.c:3610 [inline]
__slab_alloc_node mm/slub.c:3663 [inline]
slab_alloc_node mm/slub.c:3835 [inline]
__do_kmalloc_node mm/slub.c:3965 [inline]
__kmalloc+0x2e5/0x4a0 mm/slub.c:3979
kmalloc include/linux/slab.h:632 [inline]
kzalloc include/linux/slab.h:749 [inline]
fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3759
addrconf_f6i_alloc+0x3c2/0x7f0 net/ipv6/route.c:4583
fixup_permanent_addr net/ipv6/addrconf.c:3583 [inline]
addrconf_permanent_addr+0x2c8/0xc50 net/ipv6/addrconf.c:3622
addrconf_notify+0x9f5/0x1020 net/ipv6/addrconf.c:3694
notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
__dev_notify_flags+0x207/0x400
dev_change_flags+0xf0/0x1a0 net/core/dev.c:8760
do_setlink+0xccd/0x41f0 net/core/rtnetlink.c:2884
page last free pid 5104 tgid 5104 stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1140 [inline]
free_unref_page_prepare+0x968/0xa90 mm/page_alloc.c:2346
free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486
discard_slab mm/slub.c:2437 [inline]
__put_partials+0xeb/0x130 mm/slub.c:2906
put_cpu_partial+0x17c/0x250 mm/slub.c:2981
__slab_free+0x2ea/0x3d0 mm/slub.c:4151
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x5e/0xc0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3798 [inline]
slab_alloc_node mm/slub.c:3845 [inline]
__do_kmalloc_node mm/slub.c:3965 [inline]
__kmalloc+0x1e2/0x4a0 mm/slub.c:3979
kmalloc include/linux/slab.h:632 [inline]
kzalloc include/linux/slab.h:749 [inline]
fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155
ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3759
ip6_route_add+0x28/0x160 net/ipv6/route.c:3851
addrconf_add_mroute net/ipv6/addrconf.c:2547 [inline]
addrconf_add_dev+0x35b/0x540 net/ipv6/addrconf.c:2565
inet6_addr_add+0x258/0xb00 net/ipv6/addrconf.c:3021
inet6_rtm_newaddr+0x8a3/0xc80 net/ipv6/addrconf.c:5045
rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595
Memory state around the buggy address:
ffff888077ee7400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888077ee7480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888077ee7500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888077ee7580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888077ee7600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 24 48 and $0x48,%al
2: 89 ee mov %ebp,%esi
4: 4c 89 f2 mov %r14,%rdx
7: e8 02 13 00 00 call 0x130e
c: 84 c0 test %al,%al
e: 0f 84 84 00 00 00 je 0x98
14: e8 85 4b 54 00 call 0x544b9e
19: 49 89 df mov %rbx,%r15
1c: 48 8b 2c 24 mov (%rsp),%rbp
20: e9 f2 02 00 00 jmp 0x317
25: 48 8b 7c 24 18 mov 0x18(%rsp),%rdi
* 2a: 48 8d 5f 02 lea 0x2(%rdi),%rbx <-- trapping instruction
2e: 48 83 c7 03 add $0x3,%rdi
32: 48 89 d8 mov %rbx,%rax
35: 48 c1 e8 03 shr $0x3,%rax
39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax
3e: 84 c0 test %al,%al