kasan: CONFIG_KASAN_INLINE enabled ================================================================== BUG: KASAN: use-after-free in skip_blocked_update kernel/sched/fair.c:3324 [inline] BUG: KASAN: use-after-free in update_blocked_averages+0x1533/0x1e00 kernel/sched/fair.c:7434 kasan: GPF could be caused by NULL-ptr deref or user memory access Read of size 8 at addr ffff888194a87da0 by task swapper/1/0 general protection fault: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 26707 Comm: syz-executor4 Not tainted 4.20.0-rc3+ #313 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.20.0-rc3+ #313 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:lookup_object lib/debugobjects.c:157 [inline] RIP: 0010:debug_object_deactivate+0x191/0x450 lib/debugobjects.c:543 Call Trace: ------------[ cut here ]------------ Bad or missing usercopy whitelist? Kernel memory overwrite attempt detected to SLAB object '$' (offset 18446744069951467056, size 64)! __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x244/0x39d lib/dump_stack.c:113 WARNING: CPU: 0 PID: 26707 at mm/usercopy.c:83 usercopy_warn+0xee/0x110 mm/usercopy.c:78 Kernel panic - not syncing: panic_on_warn set ... print_address_description.cold.7+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.8+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 skip_blocked_update kernel/sched/fair.c:3324 [inline] update_blocked_averages+0x1533/0x1e00 kernel/sched/fair.c:7434 run_rebalance_domains+0x37c/0x500 kernel/sched/fair.c:9730 __do_softirq+0x308/0xb7e kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x17f/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1cb/0x760 arch/x86/kernel/apic/apic.c:1061 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:804 RIP: 0010:native_safe_halt+0x6/0x10 arch/x86/include/asm/irqflags.h:57 Code: e9 2c ff ff ff 48 89 c7 48 89 45 d8 e8 53 9b e5 f9 48 8b 45 d8 e9 ca fe ff ff 48 89 df e8 42 9b e5 f9 eb 82 55 48 89 e5 fb f4 <5d> c3 0f 1f 84 00 00 00 00 00 55 48 89 e5 f4 5d c3 90 90 90 90 90 RSP: 0018:ffff8881d9b27cb8 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: dffffc0000000000 RBX: 1ffff1103b364f9b RCX: 0000000000000000 RDX: 1ffffffff12a3f71 RSI: 0000000000000001 RDI: ffffffff8951fb88 RBP: ffff8881d9b27cb8 R08: ffff8881d9b14340 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8881d9b27d78 R13: ffffffff8a164860 R14: 0000000000000000 R15: 0000000000000001 arch_safe_halt arch/x86/include/asm/paravirt.h:151 [inline] default_idle+0xbf/0x490 arch/x86/kernel/process.c:498 arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:489 default_idle_call+0x6d/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x49b/0x5c0 kernel/sched/idle.c:262 cpu_startup_entry+0x18/0x20 kernel/sched/idle.c:353 start_secondary+0x487/0x5f0 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 Allocated by task 25086: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc_node+0x144/0x730 mm/slab.c:3644 __alloc_skb+0x119/0x770 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:1005 [inline] alloc_skb_with_frags+0x133/0x7d0 net/core/skbuff.c:5248 sock_alloc_send_pskb+0x87a/0xaf0 net/core/sock.c:2087 sock_alloc_send_skb+0x32/0x40 net/core/sock.c:2104 __ip6_append_data.isra.46+0x1fd8/0x34f0 net/ipv6/ip6_output.c:1418 ip6_append_data+0x1bc/0x2d0 net/ipv6/ip6_output.c:1587 icmp6_send+0x1de1/0x2d70 net/ipv6/icmp.c:574 icmpv6_send+0x180/0x310 net/ipv6/ip6_icmp.c:43 ip6_link_failure+0x9b/0x6c0 net/ipv6/route.c:2229 dst_link_failure include/net/dst.h:427 [inline] vti_xmit net/ipv4/ip_vti.c:229 [inline] vti_tunnel_xmit+0xbdf/0x1730 net/ipv4/ip_vti.c:264 __netdev_start_xmit include/linux/netdevice.h:4369 [inline] netdev_start_xmit include/linux/netdevice.h:4378 [inline] xmit_one net/core/dev.c:3259 [inline] dev_hard_start_xmit+0x295/0xc80 net/core/dev.c:3275 __dev_queue_xmit+0x2f7a/0x3ae0 net/core/dev.c:3845 dev_queue_xmit+0x17/0x20 net/core/dev.c:3878 neigh_direct_output+0x15/0x20 net/core/neighbour.c:1422 neigh_output include/net/neighbour.h:484 [inline] ip6_finish_output2+0xc91/0x27a0 net/ipv6/ip6_output.c:120 ip6_finish_output+0x58c/0xc60 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x232/0x9d0 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:444 [inline] ip6_local_out+0xc5/0x1b0 net/ipv6/output_core.c:176 ip6_send_skb+0xbc/0x340 net/ipv6/ip6_output.c:1695 udp_v6_send_skb.isra.31+0x83d/0x14b0 net/ipv6/udp.c:1206 udpv6_sendmsg+0x2d92/0x36b0 net/ipv6/udp.c:1503 inet_sendmsg+0x1a1/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:621 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:631 ___sys_sendmsg+0x51d/0x930 net/socket.c:2116 __sys_sendmmsg+0x246/0x6d0 net/socket.c:2211 __do_sys_sendmmsg net/socket.c:2240 [inline] __se_sys_sendmmsg net/socket.c:2237 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2237 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 25086: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x83/0x290 mm/slab.c:3760 kfree_skbmem+0x154/0x230 net/core/skbuff.c:582 __kfree_skb net/core/skbuff.c:642 [inline] kfree_skb+0x1c3/0x580 net/core/skbuff.c:659 icmpv6_rcv+0x7a1/0x1b20 net/ipv6/icmp.c:923 ip6_protocol_deliver_rcu+0x381/0x1950 net/ipv6/ip6_input.c:394 ip6_input_finish+0x84/0x170 net/ipv6/ip6_input.c:434 NF_HOOK include/linux/netfilter.h:289 [inline] ip6_input+0xe9/0x600 net/ipv6/ip6_input.c:443 dst_input include/net/dst.h:450 [inline] ip6_rcv_finish+0x17a/0x330 net/ipv6/ip6_input.c:76 NF_HOOK include/linux/netfilter.h:289 [inline] ipv6_rcv+0x115/0x640 net/ipv6/ip6_input.c:272 __netif_receive_skb_one_core+0x14d/0x200 net/core/dev.c:4948 __netif_receive_skb+0x2c/0x1e0 net/core/dev.c:5058 process_backlog+0x24e/0x7a0 net/core/dev.c:5870 napi_poll net/core/dev.c:6293 [inline] net_rx_action+0x7fa/0x19b0 net/core/dev.c:6359 __do_softirq+0x308/0xb7e kernel/softirq.c:292 The buggy address belongs to the object at ffff888194a87d40 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 96 bytes inside of 232-byte region [ffff888194a87d40, ffff888194a87e28) The buggy address belongs to the page: page:ffffea000652a1c0 count:1 mapcount:0 mapping:ffff8881d9bee600 index:0x0 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea00074bd908 ffffea000637f688 ffff8881d9bee600 raw: 0000000000000000 ffff888194a870c0 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888194a87c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ffff888194a87d00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb >ffff888194a87d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888194a87e00: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff888194a87e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access Shutting down cpus with NMI Kernel Offset: disabled ====================================================== WARNING: possible circular locking dependency detected 4.20.0-rc3+ #313 Not tainted ------------------------------------------------------ syz-executor4/26707 is trying to acquire lock: 000000005e6b524d ((console_sem).lock){-.-.}, at: down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 but task is already holding lock: 000000006a490b6f (&obj_hash[i].lock){-.-.}, at: debug_object_deactivate+0xf7/0x450 lib/debugobjects.c:541 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&obj_hash[i].lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 __debug_object_init+0x127/0x1290 lib/debugobjects.c:384 debug_object_init+0x16/0x20 lib/debugobjects.c:432 debug_hrtimer_init kernel/time/hrtimer.c:410 [inline] debug_init kernel/time/hrtimer.c:458 [inline] hrtimer_init+0x97/0x490 kernel/time/hrtimer.c:1308 init_dl_task_timer+0x1b/0x50 kernel/sched/deadline.c:1057 __sched_fork+0x2ae/0x590 kernel/sched/core.c:2166 init_idle+0x75/0x740 kernel/sched/core.c:5374 sched_init+0xb33/0xc07 kernel/sched/core.c:6060 start_kernel+0x4be/0xa2b init/main.c:608 x86_64_start_reservations+0x2e/0x30 arch/x86/kernel/head64.c:472 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #2 (&rq->lock){-.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2d/0x40 kernel/locking/spinlock.c:144 rq_lock kernel/sched/sched.h:1126 [inline] task_fork_fair+0xb0/0x6d0 kernel/sched/fair.c:9802 sched_fork+0x443/0xba0 kernel/sched/core.c:2359 copy_process+0x25b8/0x87a0 kernel/fork.c:1887 _do_fork+0x1cb/0x11d0 kernel/fork.c:2216 kernel_thread+0x34/0x40 kernel/fork.c:2275 rest_init+0x28/0x372 init/main.c:409 arch_call_rest_init+0xe/0x1b start_kernel+0x9f0/0xa2b init/main.c:745 x86_64_start_reservations+0x2e/0x30 arch/x86/kernel/head64.c:472 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (&p->pi_lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 try_to_wake_up+0xdc/0x1490 kernel/sched/core.c:1965 wake_up_process+0x10/0x20 kernel/sched/core.c:2129 __up.isra.1+0x1c0/0x2a0 kernel/locking/semaphore.c:262 up+0x13c/0x1c0 kernel/locking/semaphore.c:187 __up_console_sem+0xbe/0x1b0 kernel/printk/printk.c:236 console_unlock+0x811/0x1190 kernel/printk/printk.c:2432 vprintk_emit+0x391/0x990 kernel/printk/printk.c:1922 vprintk_default+0x28/0x30 kernel/printk/printk.c:1964 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1997 check_stack_usage kernel/exit.c:755 [inline] do_exit.cold.18+0x57/0x16f kernel/exit.c:916 do_group_exit+0x177/0x440 kernel/exit.c:970 __do_sys_exit_group kernel/exit.c:981 [inline] __se_sys_exit_group kernel/exit.c:979 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:979 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 ((console_sem).lock){-.-.}: other info that might help us debug this: Chain exists of: (console_sem).lock --> &rq->lock --> &obj_hash[i].lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&obj_hash[i].lock); lock(&rq->lock); lock(&obj_hash[i].lock); lock((console_sem).lock); *** DEADLOCK *** 5 locks held by syz-executor4/26707: #0: 000000005fa5f5cc (rcu_read_lock){....}, at: __skb_unlink include/linux/skbuff.h:1917 [inline] #0: 000000005fa5f5cc (rcu_read_lock){....}, at: __skb_dequeue include/linux/skbuff.h:1933 [inline] #0: 000000005fa5f5cc (rcu_read_lock){....}, at: process_backlog+0x1dd/0x7a0 net/core/dev.c:5868 #1: 000000005fa5f5cc (rcu_read_lock){....}, at: __skb_pull include/linux/skbuff.h:2150 [inline] #1: 000000005fa5f5cc (rcu_read_lock){....}, at: ip_local_deliver_finish+0x13d/0x390 net/ipv4/ip_input.c:231 #2: 000000005bb29e1b (hrtimer_bases.lock){-.-.}, at: hrtimer_interrupt+0xfc/0x780 kernel/time/hrtimer.c:1499 #3: 000000006a490b6f (&obj_hash[i].lock){-.-.}, at: debug_object_deactivate+0xf7/0x450 lib/debugobjects.c:541 #4: 000000005fa5f5cc (rcu_read_lock){....}, at: atomic_notifier_call_chain+0x0/0x190 kernel/notifier.c:329 stack backtrace: CPU: 0 PID: 26707 Comm: syz-executor4 Not tainted 4.20.0-rc3+ #313 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: Rebooting in 86400 seconds..