==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:818 [inline]
BUG: KASAN: slab-use-after-free in min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
BUG: KASAN: slab-use-after-free in reweight_entity+0x8c7/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880688559e8 by task syz-executor.2/27686
CPU: 0 PID: 27686 Comm: syz-executor.2 Not tainted 6.6.0-rc6-syzkaller-01858-gef113733c288 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
min_deadline_update kernel/sched/fair.c:818 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x8c7/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/0xc10 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1063 [inline]
__sysvec_apic_timer_interrupt+0x105/0x3f0 arch/x86/kernel/apic/apic.c:1080
sysvec_apic_timer_interrupt+0x42/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__local_bh_enable_ip+0xac/0x120 kernel/softirq.c:388
Code: 1d 41 d8 b3 7e 65 8b 05 3a d8 b3 7e a9 00 ff ff 00 74 45 bf 01 00 00 00 e8 61 9f 0a 00 e8 7c b6 3e 00 fb 65 8b 05 1c d8 b3 7e <85> c0 74 4a 5b 5d c3 65 8b 05 22 a2 b2 7e 85 c0 75 a2 0f 0b eb 9e
RSP: 0018:ffffc90000007858 EFLAGS: 00000202
RAX: 0000000080000101 RBX: 00000000fffffe01 RCX: 1ffffffff2342ec0
RDX: 0000000000000000 RSI: ffffffff8a8caca0 RDI: ffffffff8ae93ea0
RBP: ffffffff88db4073 R08: 0000000000000001 R09: fffffbfff23393e7
R10: ffffffff919c9f3f R11: 00080aaaaaaaaaaa R12: 1ffff92000000f2f
R13: ffff88807dc18840 R14: dffffc0000000000 R15: 0000000000000001
local_bh_enable include/linux/bottom_half.h:33 [inline]
ipt_do_table+0xd40/0x1a80 net/ipv4/netfilter/ip_tables.c:357
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xbb/0x1f0 net/netfilter/core.c:626
nf_hook include/linux/netfilter.h:269 [inline]
NF_HOOK include/linux/netfilter.h:312 [inline]
ip_local_deliver+0x2de/0x550 net/ipv4/ip_input.c:254
dst_input include/net/dst.h:461 [inline]
ip_rcv_finish+0x1c4/0x2e0 net/ipv4/ip_input.c:449
NF_HOOK include/linux/netfilter.h:314 [inline]
NF_HOOK include/linux/netfilter.h:308 [inline]
ip_rcv+0xce/0x440 net/ipv4/ip_input.c:569
__netif_receive_skb_one_core+0x115/0x180 net/core/dev.c:5527
__netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5641
process_backlog+0x101/0x6b0 net/core/dev.c:5969
__napi_poll.constprop.0+0xb4/0x530 net/core/dev.c:6531
napi_poll net/core/dev.c:6598 [inline]
net_rx_action+0x956/0xe90 net/core/dev.c:6731
__do_softirq+0x218/0x965 kernel/softirq.c:553
do_softirq kernel/softirq.c:454 [inline]
do_softirq+0xaa/0xe0 kernel/softirq.c:441
__local_bh_enable_ip+0xf8/0x120 kernel/softirq.c:381
local_bh_enable include/linux/bottom_half.h:33 [inline]
rcu_read_unlock_bh include/linux/rcupdate.h:819 [inline]
__dev_queue_xmit+0xa6f/0x3d10 net/core/dev.c:4371
dev_queue_xmit include/linux/netdevice.h:3108 [inline]
neigh_hh_output include/net/neighbour.h:526 [inline]
neigh_output include/net/neighbour.h:540 [inline]
ip_finish_output2+0x16a2/0x2550 net/ipv4/ip_output.c:235
__ip_finish_output net/ipv4/ip_output.c:313 [inline]
__ip_finish_output+0x38b/0x640 net/ipv4/ip_output.c:295
ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323
NF_HOOK_COND include/linux/netfilter.h:303 [inline]
ip_output+0x13b/0x290 net/ipv4/ip_output.c:433
dst_output include/net/dst.h:451 [inline]
ip_local_out net/ipv4/ip_output.c:129 [inline]
ip_send_skb net/ipv4/ip_output.c:1489 [inline]
ip_push_pending_frames+0x125/0x2a0 net/ipv4/ip_output.c:1509
raw_sendmsg+0x14cb/0x3720 net/ipv4/raw.c:646
inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:847
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0xd5/0x180 net/socket.c:745
____sys_sendmsg+0x2ac/0x940 net/socket.c:2558
___sys_sendmsg+0x135/0x1d0 net/socket.c:2612
__sys_sendmmsg+0x1a1/0x450 net/socket.c:2698
__do_sys_sendmmsg net/socket.c:2727 [inline]
__se_sys_sendmmsg net/socket.c:2724 [inline]
__x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2724
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fd69627cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fd6970400c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fd69639bf80 RCX: 00007fd69627cae9
RDX: 0000000004000095 RSI: 0000000020005240 RDI: 0000000000000005
RBP: 00007fd6962c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fd69639bf80 R15: 00007fff77994ea8
Allocated by task 5400:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
__kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct kernel/fork.c:1110 [inline]
copy_process+0x41c/0x73f0 kernel/fork.c:2327
kernel_clone+0xfd/0x920 kernel/fork.c:2909
user_mode_thread+0xb4/0xf0 kernel/fork.c:2987
call_usermodehelper_exec_sync kernel/umh.c:133 [inline]
call_usermodehelper_exec_work+0x6b/0x170 kernel/umh.c:164
process_one_work+0x884/0x15c0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 27697:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0xf0/0x480 mm/slub.c:3831
put_task_struct include/linux/sched/task.h:136 [inline]
put_task_struct include/linux/sched/task.h:123 [inline]
delayed_put_task_struct+0x21b/0x2b0 kernel/exit.c:226
rcu_do_batch kernel/rcu/tree.c:2139 [inline]
rcu_core+0x805/0x1bb0 kernel/rcu/tree.c:2403
__do_softirq+0x218/0x965 kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
__call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653
put_task_struct_rcu_user kernel/exit.c:232 [inline]
put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:229
release_task+0xef7/0x1b70 kernel/exit.c:282
wait_task_zombie kernel/exit.c:1210 [inline]
wait_consider_task+0x17b5/0x4000 kernel/exit.c:1437
do_wait_pid kernel/exit.c:1568 [inline]
do_wait+0x669/0xc70 kernel/exit.c:1610
kernel_wait+0xa0/0x150 kernel/exit.c:1797
call_usermodehelper_exec_sync kernel/umh.c:137 [inline]
call_usermodehelper_exec_work+0xf1/0x170 kernel/umh.c:164
process_one_work+0x884/0x15c0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Second to last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
task_work_add+0x88/0x2a0 kernel/task_work.c:48
scheduler_tick+0x228/0x650 kernel/sched/core.c:5662
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/0xc10 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1063 [inline]
__sysvec_apic_timer_interrupt+0x105/0x3f0 arch/x86/kernel/apic/apic.c:1080
sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
The buggy address belongs to the object at ffff888068855940
which belongs to the cache task_struct of size 7360
The buggy address is located 168 bytes inside of
freed 7360-byte region [ffff888068855940, ffff888068857600)
The buggy address belongs to the physical page:
page:ffffea0001a21400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x68850
head:ffffea0001a21400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801975aa81
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 ffffea0000807000 dead000000000002
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801975aa81
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5070, tgid 5070 (syz-executor.0), ts 1458234356969, free_ts 1398467447806
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297
alloc_slab_page mm/slub.c:1870 [inline]
allocate_slab+0x251/0x380 mm/slub.c:2017
new_slab mm/slub.c:2070 [inline]
___slab_alloc+0x8c7/0x1580 mm/slub.c:3223
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
kmem_cache_alloc_node+0x132/0x3f0 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct kernel/fork.c:1110 [inline]
copy_process+0x41c/0x73f0 kernel/fork.c:2327
kernel_clone+0xfd/0x920 kernel/fork.c:2909
__do_sys_clone+0xba/0x100 kernel/fork.c:3052
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/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:1136 [inline]
free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405
__unfreeze_partials+0x21d/0x240 mm/slub.c:2655
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523
__alloc_skb+0x287/0x330 net/core/skbuff.c:640
alloc_skb include/linux/skbuff.h:1286 [inline]
__ip6_append_data.isra.0+0x2553/0x4570 net/ipv6/ip6_output.c:1647
ip6_append_data+0x1e6/0x510 net/ipv6/ip6_output.c:1832
rawv6_sendmsg+0x15c6/0x4060 net/ipv6/raw.c:913
inet_sendmsg+0x9d/0xe0 net/ipv4/af_inet.c:847
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg+0xd5/0x180 net/socket.c:745
____sys_sendmsg+0x2ac/0x940 net/socket.c:2558
___sys_sendmsg+0x135/0x1d0 net/socket.c:2612
__sys_sendmmsg+0x1a1/0x450 net/socket.c:2698
Memory state around the buggy address:
ffff888068855880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888068855900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff888068855980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888068855a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888068855a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 1d 41 d8 b3 7e sbb $0x7eb3d841,%eax
5: 65 8b 05 3a d8 b3 7e mov %gs:0x7eb3d83a(%rip),%eax # 0x7eb3d846
c: a9 00 ff ff 00 test $0xffff00,%eax
11: 74 45 je 0x58
13: bf 01 00 00 00 mov $0x1,%edi
18: e8 61 9f 0a 00 call 0xa9f7e
1d: e8 7c b6 3e 00 call 0x3eb69e
22: fb sti
23: 65 8b 05 1c d8 b3 7e mov %gs:0x7eb3d81c(%rip),%eax # 0x7eb3d846
* 2a: 85 c0 test %eax,%eax <-- trapping instruction
2c: 74 4a je 0x78
2e: 5b pop %rbx
2f: 5d pop %rbp
30: c3 ret
31: 65 8b 05 22 a2 b2 7e mov %gs:0x7eb2a222(%rip),%eax # 0x7eb2a25a
38: 85 c0 test %eax,%eax
3a: 75 a2 jne 0xffffffde
3c: 0f 0b ud2
3e: eb 9e jmp 0xffffffde