device lo entered promiscuous mode BUG: sleeping function called from invalid context at net/core/sock.c:2502 in_atomic(): 1, irqs_disabled(): 0, pid: 11396, name: syz-executor4 1 lock held by syz-executor4/11396: #0: (rcu_callback){......}, at: [] __rcu_reclaim kernel/rcu/rcu.h:108 [inline] #0: (rcu_callback){......}, at: [] rcu_do_batch kernel/rcu/tree.c:2789 [inline] #0: (rcu_callback){......}, at: [] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] #0: (rcu_callback){......}, at: [] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] #0: (rcu_callback){......}, at: [] rcu_process_callbacks+0x98e/0x12b0 kernel/rcu/tree.c:3037 Preemption disabled at:[ 165.143649] [] __debug_check_no_obj_freed lib/debugobjects.c:711 [inline] Preemption disabled at:[ 165.143649] [] debug_check_no_obj_freed+0x164/0x930 lib/debugobjects.c:749 CPU: 0 PID: 11396 Comm: syz-executor4 Not tainted 4.9.124-g09eb2ba #31 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801db207cd8 ffffffff81eb95e9 ffffffff81f240d4 0000000000000000 0000000000000101 ffff88019ca36000 ffff88019ca36000 ffff8801db207d10 ffffffff81426851 ffff88019ca36000 ffffffff840f88a0 00000000000009c6 Call Trace: [ 165.195933] [] __dump_stack lib/dump_stack.c:15 [inline] [ 165.195933] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] ___might_sleep.cold.123+0x1bc/0x1f5 kernel/sched/core.c:7988 [] __might_sleep+0x95/0x1a0 kernel/sched/core.c:7945 [] lock_sock_nested+0x34/0x120 net/core/sock.c:2502 [] lock_sock include/net/sock.h:1404 [inline] [] inet_shutdown+0x69/0x360 net/ipv4/af_inet.c:823 [] pppol2tp_session_close+0xa0/0xe0 net/l2tp/l2tp_ppp.c:441 [] l2tp_tunnel_closeall+0x231/0x350 net/l2tp/l2tp_core.c:1368 [] l2tp_tunnel_destruct+0x2f2/0x590 net/l2tp/l2tp_core.c:1324 [] __sk_destruct+0x55/0x590 net/core/sock.c:1428 [] __rcu_reclaim kernel/rcu/rcu.h:118 [inline] [] rcu_do_batch kernel/rcu/tree.c:2789 [inline] [] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] [] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] [] rcu_process_callbacks+0x8ae/0x12b0 kernel/rcu/tree.c:3037 [] __do_softirq+0x210/0x940 kernel/softirq.c:288 [] invoke_softirq kernel/softirq.c:368 [inline] [] irq_exit+0x114/0x150 kernel/softirq.c:409 [] exiting_irq arch/x86/include/asm/apic.h:669 [inline] [] smp_apic_timer_interrupt+0x81/0xa0 arch/x86/kernel/apic/apic.c:962 [] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:648 [ 165.326907] [] ? arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] [ 165.326907] [] ? __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:162 [inline] [ 165.326907] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 kernel/locking/spinlock.c:191 [] __debug_check_no_obj_freed lib/debugobjects.c:733 [inline] [] debug_check_no_obj_freed+0x2ec/0x930 lib/debugobjects.c:749 [] free_pages_prepare mm/page_alloc.c:1073 [inline] [] __free_pages_ok+0x1dd/0x1610 mm/page_alloc.c:1275 [] free_compound_page+0x5e/0x70 mm/page_alloc.c:606 [] free_transhuge_page+0x99/0xc0 mm/huge_memory.c:2231 [] __put_compound_page+0x80/0xc0 mm/swap.c:94 [] release_pages+0x2f4/0x970 mm/swap.c:763 [] free_pages_and_swap_cache+0x117/0x160 mm/swap_state.c:273 [] tlb_flush_mmu_free+0xb4/0x150 mm/memory.c:259 [] zap_pte_range mm/memory.c:1216 [inline] [] zap_pmd_range mm/memory.c:1258 [inline] [] zap_pud_range mm/memory.c:1279 [inline] [] unmap_page_range+0x10a4/0x17a0 mm/memory.c:1300 [] unmap_single_vma+0x101/0x260 mm/memory.c:1345 [] unmap_vmas+0x102/0x1d0 mm/memory.c:1375 [] exit_mmap+0x214/0x3f0 mm/mmap.c:3020 [] __mmput kernel/fork.c:884 [inline] [] mmput+0xf3/0x2d0 kernel/fork.c:906 [] exit_mm kernel/exit.c:514 [inline] [] do_exit+0x906/0x27b0 kernel/exit.c:820 [] do_group_exit+0x111/0x340 kernel/exit.c:937 [] get_signal+0x4cf/0x1450 kernel/signal.c:2321 [] do_signal+0x87/0x19f0 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:157 [] prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] [] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb ================================= binder: 11376:11407 transaction failed 29189/-22, size 24-8 line 3013 [ INFO: inconsistent lock state ] 4.9.124-g09eb2ba #31 Tainted: G W --------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor4/11396 [HC0[0]:SC1[3]:HE1:SE0] takes: (sk_lock-AF_PPPOX){+.?.+.}, at: [] lock_sock include/net/sock.h:1404 [inline] (sk_lock-AF_PPPOX){+.?.+.}, at: [] inet_shutdown+0x69/0x360 net/ipv4/af_inet.c:823 mark_held_locks+0xc7/0x130 kernel/locking/lockdep.c:2660 __trace_hardirqs_on_caller kernel/locking/lockdep.c:2689 [inline] trace_hardirqs_on_caller+0x38b/0x590 kernel/locking/lockdep.c:2736 trace_hardirqs_on+0xd/0x10 kernel/locking/lockdep.c:2743 __local_bh_enable_ip+0x6a/0xd0 kernel/softirq.c:190 local_bh_enable include/linux/bottom_half.h:31 [inline] lock_sock_nested+0xdc/0x120 net/core/sock.c:2512 lock_sock include/net/sock.h:1404 [inline] pppol2tp_connect+0xd9/0x18f0 net/l2tp/l2tp_ppp.c:590 SYSC_connect+0x1b8/0x300 net/socket.c:1575 SyS_connect+0x24/0x30 net/socket.c:1556 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb irq event stamp: 894 hardirqs last enabled at (894): [] restore_regs_and_iret+0x0/0x1d hardirqs last disabled at (893): [] common_interrupt+0x9b/0xa0 arch/x86/entry/entry_64.S:461 softirqs last enabled at (158): [] in6_dump_addrs net/ipv6/addrconf.c:4801 [inline] softirqs last enabled at (158): [] inet6_dump_addr+0x59d/0x1510 net/ipv6/addrconf.c:4836 softirqs last disabled at (723): [] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (723): [] irq_exit+0x114/0x150 kernel/softirq.c:409 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sk_lock-AF_PPPOX); lock(sk_lock-AF_PPPOX); *** DEADLOCK *** 1 lock held by syz-executor4/11396: #0: (rcu_callback){......}, at: [] __rcu_reclaim kernel/rcu/rcu.h:108 [inline] #0: (rcu_callback){......}, at: [] rcu_do_batch kernel/rcu/tree.c:2789 [inline] #0: (rcu_callback){......}, at: [] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] #0: (rcu_callback){......}, at: [] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] #0: (rcu_callback){......}, at: [] rcu_process_callbacks+0x98e/0x12b0 kernel/rcu/tree.c:3037 stack backtrace: CPU: 0 PID: 11396 Comm: syz-executor4 Tainted: G W 4.9.124-g09eb2ba #31 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801db207a58 ffffffff81eb95e9 ffff88019ca36000 ffffffff855faad0 ffff88019ca368f0 ffff88019ca36910 0000000000000000 ffff8801db207ac8 ffffffff81429ccd 0000000000000003 0000000000000001 ffff880100000000 Call Trace: [ 165.812641] [] __dump_stack lib/dump_stack.c:15 [inline] [ 165.812641] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_usage_bug.cold.57+0x327/0x421 kernel/locking/lockdep.c:2387 [] valid_state kernel/locking/lockdep.c:2400 [inline] [] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [] mark_lock+0xcc6/0x1280 kernel/locking/lockdep.c:3065 [] mark_irqflags kernel/locking/lockdep.c:2923 [inline] [] __lock_acquire+0xd40/0x4070 kernel/locking/lockdep.c:3302 [] lock_acquire+0x130/0x3e0 kernel/locking/lockdep.c:3756 [] lock_sock_nested+0xc6/0x120 net/core/sock.c:2511 [] lock_sock include/net/sock.h:1404 [inline] [] inet_shutdown+0x69/0x360 net/ipv4/af_inet.c:823 [] pppol2tp_session_close+0xa0/0xe0 net/l2tp/l2tp_ppp.c:441 [] l2tp_tunnel_closeall+0x231/0x350 net/l2tp/l2tp_core.c:1368 [] l2tp_tunnel_destruct+0x2f2/0x590 net/l2tp/l2tp_core.c:1324 [] __sk_destruct+0x55/0x590 net/core/sock.c:1428 [] __rcu_reclaim kernel/rcu/rcu.h:118 [inline] [] rcu_do_batch kernel/rcu/tree.c:2789 [inline] [] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] [] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] [] rcu_process_callbacks+0x8ae/0x12b0 kernel/rcu/tree.c:3037 [] __do_softirq+0x210/0x940 kernel/softirq.c:288 [] invoke_softirq kernel/softirq.c:368 [inline] [] irq_exit+0x114/0x150 kernel/softirq.c:409 [] exiting_irq arch/x86/include/asm/apic.h:669 [inline] [] smp_apic_timer_interrupt+0x81/0xa0 arch/x86/kernel/apic/apic.c:962 [] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:648 [ 165.984140] [] ? arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] [ 165.984140] [] ? __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:162 [inline] [ 165.984140] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 kernel/locking/spinlock.c:191 [] __debug_check_no_obj_freed lib/debugobjects.c:733 [inline] [] debug_check_no_obj_freed+0x2ec/0x930 lib/debugobjects.c:749 [] free_pages_prepare mm/page_alloc.c:1073 [inline] [] __free_pages_ok+0x1dd/0x1610 mm/page_alloc.c:1275 [] free_compound_page+0x5e/0x70 mm/page_alloc.c:606 [] free_transhuge_page+0x99/0xc0 mm/huge_memory.c:2231 [] __put_compound_page+0x80/0xc0 mm/swap.c:94 [] release_pages+0x2f4/0x970 mm/swap.c:763 [] free_pages_and_swap_cache+0x117/0x160 mm/swap_state.c:273 [] tlb_flush_mmu_free+0xb4/0x150 mm/memory.c:259 [] zap_pte_range mm/memory.c:1216 [inline] [] zap_pmd_range mm/memory.c:1258 [inline] [] zap_pud_range mm/memory.c:1279 [inline] [] unmap_page_range+0x10a4/0x17a0 mm/memory.c:1300 [] unmap_single_vma+0x101/0x260 mm/memory.c:1345 [] unmap_vmas+0x102/0x1d0 mm/memory.c:1375 [] exit_mmap+0x214/0x3f0 mm/mmap.c:3020 [] __mmput kernel/fork.c:884 [inline] [] mmput+0xf3/0x2d0 kernel/fork.c:906 [] exit_mm kernel/exit.c:514 [inline] [] do_exit+0x906/0x27b0 kernel/exit.c:820 [] do_group_exit+0x111/0x340 kernel/exit.c:937 [] get_signal+0x4cf/0x1450 kernel/signal.c:2321 [] do_signal+0x87/0x19f0 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:157 [] prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] [] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb ================================================================== BUG: KASAN: use-after-free in inet_shutdown+0x2dc/0x360 net/ipv4/af_inet.c:824 Read of size 4 at addr ffff8801b6e88cc0 by task syz-executor4/11396 CPU: 0 PID: 11396 Comm: syz-executor4 Tainted: G W 4.9.124-g09eb2ba #31 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801db207cf8 ffffffff81eb95e9 ffffea0006dba200 ffff8801b6e88cc0 0000000000000000 ffff8801b6e88cc0 ffff8801d4fbf458 ffff8801db207d30 ffffffff8156c35e ffff8801b6e88cc0 0000000000000004 0000000000000000 Call Trace: [ 166.306281] [] __dump_stack lib/dump_stack.c:15 [inline] [ 166.306281] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x6c/0x234 mm/kasan/report.c:256 [] kasan_report_error mm/kasan/report.c:355 [inline] [] kasan_report.cold.6+0x242/0x2fe mm/kasan/report.c:412 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432 [] inet_shutdown+0x2dc/0x360 net/ipv4/af_inet.c:824 [] pppol2tp_session_close+0xa0/0xe0 net/l2tp/l2tp_ppp.c:441 [] l2tp_tunnel_closeall+0x231/0x350 net/l2tp/l2tp_core.c:1368 [] l2tp_tunnel_destruct+0x2f2/0x590 net/l2tp/l2tp_core.c:1324 [] __sk_destruct+0x55/0x590 net/core/sock.c:1428 [] __rcu_reclaim kernel/rcu/rcu.h:118 [inline] [] rcu_do_batch kernel/rcu/tree.c:2789 [inline] [] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] [] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] [] rcu_process_callbacks+0x8ae/0x12b0 kernel/rcu/tree.c:3037 [] __do_softirq+0x210/0x940 kernel/softirq.c:288 [] invoke_softirq kernel/softirq.c:368 [inline] [] irq_exit+0x114/0x150 kernel/softirq.c:409 [] exiting_irq arch/x86/include/asm/apic.h:669 [inline] [] smp_apic_timer_interrupt+0x81/0xa0 arch/x86/kernel/apic/apic.c:962 [] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:648 [ 166.430996] [] ? arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] [ 166.430996] [] ? __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:162 [inline] [ 166.430996] [] ? _raw_spin_unlock_irqrestore+0x5f/0x70 kernel/locking/spinlock.c:191 [] __debug_check_no_obj_freed lib/debugobjects.c:733 [inline] [] debug_check_no_obj_freed+0x2ec/0x930 lib/debugobjects.c:749 [] free_pages_prepare mm/page_alloc.c:1073 [inline] [] __free_pages_ok+0x1dd/0x1610 mm/page_alloc.c:1275 [] free_compound_page+0x5e/0x70 mm/page_alloc.c:606 [] free_transhuge_page+0x99/0xc0 mm/huge_memory.c:2231 [] __put_compound_page+0x80/0xc0 mm/swap.c:94 [] release_pages+0x2f4/0x970 mm/swap.c:763 [] free_pages_and_swap_cache+0x117/0x160 mm/swap_state.c:273 [] tlb_flush_mmu_free+0xb4/0x150 mm/memory.c:259 [] zap_pte_range mm/memory.c:1216 [inline] [] zap_pmd_range mm/memory.c:1258 [inline] [] zap_pud_range mm/memory.c:1279 [inline] [] unmap_page_range+0x10a4/0x17a0 mm/memory.c:1300 [] unmap_single_vma+0x101/0x260 mm/memory.c:1345 [] unmap_vmas+0x102/0x1d0 mm/memory.c:1375 [] exit_mmap+0x214/0x3f0 mm/mmap.c:3020 [] __mmput kernel/fork.c:884 [inline] [] mmput+0xf3/0x2d0 kernel/fork.c:906 [] exit_mm kernel/exit.c:514 [inline] [] do_exit+0x906/0x27b0 kernel/exit.c:820 [] do_group_exit+0x111/0x340 kernel/exit.c:937 [] get_signal+0x4cf/0x1450 kernel/signal.c:2321 [] do_signal+0x87/0x19f0 arch/x86/kernel/signal.c:807 [] exit_to_usermode_loop+0xe1/0x120 arch/x86/entry/common.c:157 [] prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] [] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Allocated by task 11392: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:609 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:547 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xbe/0x290 mm/slub.c:2728 sock_alloc_inode+0x1d/0x260 net/socket.c:251 alloc_inode+0x63/0x180 fs/inode.c:207 new_inode_pseudo+0x17/0xe0 fs/inode.c:890 sock_alloc+0x41/0x280 net/socket.c:571 __sock_create+0x8d/0x5f0 net/socket.c:1159 sock_create net/socket.c:1235 [inline] SYSC_socket net/socket.c:1265 [inline] SyS_socket+0xf0/0x1b0 net/socket.c:1245 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 entry_SYSCALL_64_after_swapgs+0x5d/0xdb Freed by task 11384: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:505 set_track mm/kasan/kasan.c:517 [inline] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:582 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kmem_cache_free+0xbe/0x310 mm/slub.c:2980 sock_destroy_inode+0x56/0x70 net/socket.c:281 destroy_inode+0xc5/0x120 fs/inode.c:264 evict+0x32b/0x4f0 fs/inode.c:570 iput_final fs/inode.c:1516 [inline] iput+0x371/0x900 fs/inode.c:1543 dentry_unlink_inode+0x277/0x330 fs/dcache.c:367 __dentry_kill+0x280/0x4c0 fs/dcache.c:569 dentry_kill fs/dcache.c:610 [inline] dput.part.29+0x5cf/0x7b0 fs/dcache.c:827 dput+0x1f/0x30 fs/dcache.c:789 __fput+0x42f/0x700 fs/file_table.c:226 ____fput+0x15/0x20 fs/file_table.c:244 task_work_run+0x10c/0x180 kernel/task_work.c:116 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0xfc/0x120 arch/x86/entry/common.c:161 prepare_exit_to_usermode arch/x86/entry/common.c:191 [inline] syscall_return_slowpath arch/x86/entry/common.c:260 [inline] do_syscall_64+0x364/0x490 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_swapgs+0x5d/0xdb The buggy address belongs to the object at ffff8801b6e88cc0 which belongs to the cache sock_inode_cache of size 960 The buggy address is located 0 bytes inside of 960-byte region [ffff8801b6e88cc0, ffff8801b6e89080) The buggy address belongs to the page: page:ffffea0006dba200 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x8000000000004080(slab|head) page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b6e88b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b6e88c00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801b6e88c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff8801b6e88d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b6e88d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================