==================================================================
BUG: KASAN: slab-use-after-free in advance_sched+0xc20/0xca0 net/sched/sch_taprio.c:942
Read of size 8 at addr ffff88802c04e910 by task dhcpcd-run-hook/13540
CPU: 1 PID: 13540 Comm: dhcpcd-run-hook 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+0xa1/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+0x86/0x2a00 arch/x86/kernel/unwind_orc.c:471
Code: 44 24 58 42 80 3c 28 00 74 08 48 89 df e8 92 b4 b7 00 48 8b 45 38 48 89 84 24 90 00 00 00 48 89 e8 48 c1 e8 03 48 89 44 24 08 <42> 0f b6 04 28 84 c0 0f 85 6a 20 00 00 44 8b 75 00 31 ff 44 89 f6
RSP: 0018:ffffc9000e0a7808 EFLAGS: 00000a02
RAX: 1ffff92001c14f1c RBX: ffffc9000e0a7918 RCX: ffff8880219e3c00
RDX: 0000000000000000 RSI: ffffffff8b73d14b RDI: ffffc9000e0a78e0
RBP: ffffc9000e0a78e0 R08: 0000000000000008 R09: ffffc9000e0a79d0
R10: 0000000000000003 R11: ffffffff8180e0a0 R12: ffff8880219e3c00
R13: dffffc0000000000 R14: ffffc9000e0a79c0 R15: ffffffff8b73d14b
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
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]
alloc_pipe_info+0xeb/0x4d0 fs/pipe.c:798
get_pipe_inode fs/pipe.c:890 [inline]
create_pipe_files+0x86/0x6a0 fs/pipe.c:922
__do_pipe_flags+0x48/0x2d0 fs/pipe.c:971
do_pipe2+0xd4/0x310 fs/pipe.c:1022
__do_sys_pipe2 fs/pipe.c:1040 [inline]
__se_sys_pipe2 fs/pipe.c:1038 [inline]
__x64_sys_pipe2+0x5a/0x70 fs/pipe.c:1038
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fecd56a419a
Code: b8 24 01 00 00 0f 05 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 9c 0d 00 f7 d8 64 89 01 48 83 c8 ff c3 31 f6 b8 25 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 5f 9c 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffff1671b88 EFLAGS: 00000246 ORIG_RAX: 0000000000000125
RAX: ffffffffffffffda RBX: 0000000000000084 RCX: 00007fecd56a419a
RDX: 0000561c0cb9ddb8 RSI: 0000000000000000 RDI: 00007ffff1671c00
RBP: 0000561c0cb9bab8 R08: 0000561c0cb9ddb8 R09: 00007fecd577eb20
R10: 0000000000000011 R11: 0000000000000246 R12: 0000000000000084
R13: 0000000000000000 R14: 0000561c0cb9c0e0 R15: 0000000000000024
Allocated by task 13548:
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_sendmmsg+0x3b2/0x740 net/socket.c:2724
__do_sys_sendmmsg net/socket.c:2753 [inline]
__se_sys_sendmmsg net/socket.c:2750 [inline]
__x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2750
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
Freed by task 23:
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_sendmmsg+0x3b2/0x740 net/socket.c:2724
__do_sys_sendmmsg net/socket.c:2753 [inline]
__se_sys_sendmmsg net/socket.c:2750 [inline]
__x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2750
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
The buggy address belongs to the object at ffff88802c04e800
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 272 bytes inside of
freed 512-byte region [ffff88802c04e800, ffff88802c04ea00)
The buggy address belongs to the physical page:
page:ffffea0000b01300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c04c
head:ffffea0000b01300 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014c41c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080100010 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5091, tgid 5091 (syz-executor.3), ts 68584918400, free_ts 68451502231
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
ipv6_add_addr+0x5b6/0x1090 net/ipv6/addrconf.c:1119
inet6_addr_add+0x563/0xb00 net/ipv6/addrconf.c:3057
inet6_rtm_newaddr+0x8a3/0xc80 net/ipv6/addrconf.c:5045
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
page last free pid 5091 tgid 5091 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]
kmalloc_trace+0x16f/0x360 mm/slub.c:3992
kmalloc include/linux/slab.h:628 [inline]
netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:643 [inline]
netdevice_event+0x37d/0x950 drivers/infiniband/core/roce_gid_mgmt.c:802
notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:1988 [inline]
call_netdevice_notifiers net/core/dev.c:2002 [inline]
dev_set_mac_address+0x3d9/0x510 net/core/dev.c:8946
bond_set_mac_address+0x28e/0x7f0 drivers/net/bonding/bond_main.c:4767
dev_set_mac_address+0x327/0x510 net/core/dev.c:8941
dev_set_mac_address_user+0x31/0x50 net/core/dev.c:8960
do_setlink+0x8b3/0x41f0 net/core/rtnetlink.c:2839
Memory state around the buggy address:
ffff88802c04e800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802c04e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802c04e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802c04e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802c04ea00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 44 24 58 rex.R and $0x58,%al
3: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
8: 74 08 je 0x12
a: 48 89 df mov %rbx,%rdi
d: e8 92 b4 b7 00 call 0xb7b4a4
12: 48 8b 45 38 mov 0x38(%rbp),%rax
16: 48 89 84 24 90 00 00 mov %rax,0x90(%rsp)
1d: 00
1e: 48 89 e8 mov %rbp,%rax
21: 48 c1 e8 03 shr $0x3,%rax
25: 48 89 44 24 08 mov %rax,0x8(%rsp)
* 2a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 6a 20 00 00 jne 0x20a1
37: 44 8b 75 00 mov 0x0(%rbp),%r14d
3b: 31 ff xor %edi,%edi
3d: 44 89 f6 mov %r14d,%esi