==================================================================
BUG: KASAN: slab-out-of-bounds in taprio_dequeue_from_txq+0x835/0x940 net/sched/sch_taprio.c:714
Read of size 8 at addr ffff888029d56480 by task syz-executor.3/5434
CPU: 1 PID: 5434 Comm: syz-executor.3 Not tainted 6.4.0-rc1-syzkaller-00109-gcc3c44c9fda2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106
print_address_description.constprop.0+0x2c/0x3c0 mm/kasan/report.c:351
print_report mm/kasan/report.c:462 [inline]
kasan_report+0x11c/0x130 mm/kasan/report.c:572
taprio_dequeue_from_txq+0x835/0x940 net/sched/sch_taprio.c:714
taprio_dequeue_tc_priority+0x277/0x450 net/sched/sch_taprio.c:795
taprio_dequeue+0x12c/0x5e0 net/sched/sch_taprio.c:862
dequeue_skb net/sched/sch_generic.c:292 [inline]
qdisc_restart net/sched/sch_generic.c:397 [inline]
__qdisc_run+0x1b2/0x1780 net/sched/sch_generic.c:415
__dev_xmit_skb net/core/dev.c:3868 [inline]
__dev_queue_xmit+0x2215/0x3b10 net/core/dev.c:4210
dev_queue_xmit include/linux/netdevice.h:3085 [inline]
neigh_hh_output include/net/neighbour.h:528 [inline]
neigh_output include/net/neighbour.h:542 [inline]
ip6_finish_output2+0xfbd/0x1560 net/ipv6/ip6_output.c:134
__ip6_finish_output net/ipv6/ip6_output.c:195 [inline]
ip6_finish_output+0x69a/0x1170 net/ipv6/ip6_output.c:206
NF_HOOK_COND include/linux/netfilter.h:292 [inline]
ip6_output+0x1f1/0x540 net/ipv6/ip6_output.c:227
dst_output include/net/dst.h:458 [inline]
NF_HOOK include/linux/netfilter.h:303 [inline]
ndisc_send_skb+0xa63/0x1850 net/ipv6/ndisc.c:508
ndisc_send_rs+0x132/0x6f0 net/ipv6/ndisc.c:718
addrconf_rs_timer+0x3f1/0x870 net/ipv6/addrconf.c:3936
call_timer_fn+0x1a0/0x580 kernel/time/timer.c:1700
expire_timers+0x29b/0x4b0 kernel/time/timer.c:1751
__run_timers kernel/time/timer.c:2022 [inline]
__run_timers kernel/time/timer.c:1995 [inline]
run_timer_softirq+0x326/0x910 kernel/time/timer.c:2035
__do_softirq+0x1d4/0x905 kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x114/0x190 kernel/softirq.c:650
irq_exit_rcu+0x9/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x97/0xc0 arch/x86/kernel/apic/apic.c:1106
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:trace_lock_acquire include/trace/events/lock.h:24 [inline]
RIP: 0010:lock_acquire+0xc9/0x520 kernel/locking/lockdep.c:5662
Code: 08 00 00 00 48 89 d0 48 89 54 24 08 48 c1 e8 06 48 8d 3c c5 50 ae 79 8e e8 f4 2a 70 00 48 8b 54 24 08 48 0f a3 15 37 9e 14 0d <0f> 82 9c 03 00 00 48 c7 c0 50 e3 79 8e 48 ba 00 00 00 00 00 fc ff
RSP: 0018:ffffc9000345f6a8 EFLAGS: 00000247
RAX: 0000000000000001 RBX: 1ffff9200068bed7 RCX: ffffffff8165100c
RDX: 0000000000000001 RSI: 0000000000000008 RDI: ffffffff8e79ae50
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8e79ae57
R10: fffffbfff1cf35ca R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000000 R14: ffffffff8c796080 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:327 [inline]
rcu_read_lock include/linux/rcupdate.h:773 [inline]
sk_filter_trim_cap+0x1f2/0xa00 net/core/filter.c:146
sk_filter include/linux/filter.h:869 [inline]
unix_dgram_sendmsg+0x5ff/0x1950 net/unix/af_unix.c:1978
sock_sendmsg_nosec net/socket.c:724 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:747
____sys_sendmsg+0x334/0x900 net/socket.c:2503
___sys_sendmsg+0x110/0x1b0 net/socket.c:2557
__sys_sendmmsg+0x18f/0x460 net/socket.c:2643
__do_sys_sendmmsg net/socket.c:2672 [inline]
__se_sys_sendmmsg net/socket.c:2669 [inline]
__x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2669
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc28668c169
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc2874cb168 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fc2867abf80 RCX: 00007fc28668c169
RDX: 0000000000000318 RSI: 00000000200bd000 RDI: 0000000000000004
RBP: 00007fc2866e7ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fffc7f94c0f R14: 00007fc2874cb300 R15: 0000000000022000
Allocated by task 5436:
kasan_save_stack+0x22/0x40 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
____kasan_kmalloc mm/kasan/common.c:333 [inline]
__kasan_kmalloc+0xa3/0xb0 mm/kasan/common.c:383
kasan_kmalloc include/linux/kasan.h:196 [inline]
__do_kmalloc_node mm/slab_common.c:966 [inline]
__kmalloc+0x5e/0x190 mm/slab_common.c:979
kmalloc_array include/linux/slab.h:596 [inline]
kcalloc include/linux/slab.h:627 [inline]
taprio_init+0x319/0x940 net/sched/sch_taprio.c:2086
qdisc_create+0x4d1/0x1040 net/sched/sch_api.c:1297
tc_modify_qdisc+0x488/0x1aa0 net/sched/sch_api.c:1682
rtnetlink_rcv_msg+0x43d/0xd50 net/core/rtnetlink.c:6395
netlink_rcv_skb+0x165/0x440 net/netlink/af_netlink.c:2546
netlink_unicast_kernel net/netlink/af_netlink.c:1339 [inline]
netlink_unicast+0x547/0x7f0 net/netlink/af_netlink.c:1365
netlink_sendmsg+0x925/0xe30 net/netlink/af_netlink.c:1913
sock_sendmsg_nosec net/socket.c:724 [inline]
sock_sendmsg+0xde/0x190 net/socket.c:747
____sys_sendmsg+0x71c/0x900 net/socket.c:2503
___sys_sendmsg+0x110/0x1b0 net/socket.c:2557
__sys_sendmsg+0xf7/0x1c0 net/socket.c:2586
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff888029d56400
which belongs to the cache kmalloc-128 of size 128
The buggy address is located 0 bytes to the right of
allocated 128-byte region [ffff888029d56400, ffff888029d56480)
The buggy address belongs to the physical page:
page:ffffea0000a75580 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29d56
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0x10()
raw: 00fff00000000200 ffff888012440400 ffffea0000b8df50 ffffea0001d96190
raw: 0000000000000000 ffff888029d56000 0000000100000010 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 5271, tgid 5270 (syz-executor.4), ts 266264607089, free_ts 266171469384
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2db/0x350 mm/page_alloc.c:1731
prep_new_page mm/page_alloc.c:1738 [inline]
get_page_from_freelist+0xf41/0x2c00 mm/page_alloc.c:3502
__alloc_pages+0x1cb/0x4a0 mm/page_alloc.c:4768
__alloc_pages_node include/linux/gfp.h:237 [inline]
kmem_getpages mm/slab.c:1360 [inline]
cache_grow_begin+0x9b/0x3b0 mm/slab.c:2569
cache_alloc_refill+0x27f/0x380 mm/slab.c:2942
____cache_alloc mm/slab.c:3018 [inline]
____cache_alloc mm/slab.c:3001 [inline]
__do_cache_alloc mm/slab.c:3201 [inline]
slab_alloc_node mm/slab.c:3249 [inline]
__kmem_cache_alloc_node+0x360/0x3f0 mm/slab.c:3540
__do_kmalloc_node mm/slab_common.c:965 [inline]
__kmalloc_node_track_caller+0x4f/0x1a0 mm/slab_common.c:986
__do_krealloc mm/slab_common.c:1359 [inline]
krealloc+0x5e/0x100 mm/slab_common.c:1392
push_jmp_history+0x13e/0x330 kernel/bpf/verifier.c:3104
do_check kernel/bpf/verifier.c:15648 [inline]
do_check_common+0xa77/0xc620 kernel/bpf/verifier.c:18215
do_check_main kernel/bpf/verifier.c:18278 [inline]
bpf_check+0x6758/0xb330 kernel/bpf/verifier.c:18899
bpf_prog_load+0x16d3/0x21e0 kernel/bpf/syscall.c:2648
__sys_bpf+0x14a3/0x53d0 kernel/bpf/syscall.c:5058
__do_sys_bpf kernel/bpf/syscall.c:5162 [inline]
__se_sys_bpf kernel/bpf/syscall.c:5160 [inline]
__x64_sys_bpf+0x79/0xc0 kernel/bpf/syscall.c:5160
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1302 [inline]
free_unref_page_prepare+0x62e/0xcb0 mm/page_alloc.c:2564
free_unref_page+0x33/0x370 mm/page_alloc.c:2659
slab_destroy mm/slab.c:1612 [inline]
slabs_destroy+0x85/0xc0 mm/slab.c:1632
cache_flusharray mm/slab.c:3360 [inline]
___cache_free+0x2ae/0x3d0 mm/slab.c:3423
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x4f/0x1a0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x195/0x220 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x63/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:186 [inline]
slab_post_alloc_hook mm/slab.h:711 [inline]
slab_alloc_node mm/slab.c:3256 [inline]
__kmem_cache_alloc_node+0x1fc/0x3f0 mm/slab.c:3540
__do_kmalloc_node mm/slab_common.c:965 [inline]
__kmalloc+0x4e/0x190 mm/slab_common.c:979
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:680 [inline]
ext4_htree_store_dirent+0x8d/0x5f0 fs/ext4/dir.c:474
htree_dirblock_to_tree+0x6c7/0xd50 fs/ext4/namei.c:1125
ext4_htree_fill_tree+0x327/0xc40 fs/ext4/namei.c:1204
ext4_dx_readdir fs/ext4/dir.c:597 [inline]
ext4_readdir+0x1d18/0x35f0 fs/ext4/dir.c:142
iterate_dir+0x56e/0x6f0 fs/readdir.c:65
__do_sys_getdents64 fs/readdir.c:369 [inline]
__se_sys_getdents64 fs/readdir.c:354 [inline]
__x64_sys_getdents64+0x13e/0x2c0 fs/readdir.c:354
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
Memory state around the buggy address:
ffff888029d56380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888029d56400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888029d56480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888029d56500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff888029d56580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
----------------
Code disassembly (best guess):
0: 08 00 or %al,(%rax)
2: 00 00 add %al,(%rax)
4: 48 89 d0 mov %rdx,%rax
7: 48 89 54 24 08 mov %rdx,0x8(%rsp)
c: 48 c1 e8 06 shr $0x6,%rax
10: 48 8d 3c c5 50 ae 79 lea -0x718651b0(,%rax,8),%rdi
17: 8e
18: e8 f4 2a 70 00 callq 0x702b11
1d: 48 8b 54 24 08 mov 0x8(%rsp),%rdx
22: 48 0f a3 15 37 9e 14 bt %rdx,0xd149e37(%rip) # 0xd149e61
29: 0d
* 2a: 0f 82 9c 03 00 00 jb 0x3cc <-- trapping instruction
30: 48 c7 c0 50 e3 79 8e mov $0xffffffff8e79e350,%rax
37: 48 rex.W
38: ba 00 00 00 00 mov $0x0,%edx
3d: 00 fc add %bh,%ah
3f: ff .byte 0xff