================================= [ INFO: inconsistent lock state ] 4.9.124-g09eb2ba #31 Tainted: G W --------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor1/22916 [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: 676 hardirqs last enabled at (676): [] dump_stack+0x100/0x128 lib/dump_stack.c:56 hardirqs last disabled at (675): [] dump_stack+0x2c/0x128 lib/dump_stack.c:38 softirqs last enabled at (0): [] copy_process.part.51+0x1172/0x6330 kernel/fork.c:1625 softirqs last disabled at (539): [] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (539): [] 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 *** 2 locks held by syz-executor1/22916: #0: (&mm->mmap_sem){++++++}, at: [] __do_page_fault+0x36b/0xd50 arch/x86/mm/fault.c:1337 #1: (rcu_callback){......}, at: [] __rcu_reclaim kernel/rcu/rcu.h:108 [inline] #1: (rcu_callback){......}, at: [] rcu_do_batch kernel/rcu/tree.c:2789 [inline] #1: (rcu_callback){......}, at: [] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] #1: (rcu_callback){......}, at: [] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] #1: (rcu_callback){......}, at: [] rcu_process_callbacks+0x98e/0x12b0 kernel/rcu/tree.c:3037 stack backtrace: CPU: 0 PID: 22916 Comm: syz-executor1 Tainted: G W 4.9.124-g09eb2ba #31 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801db207a58 ffffffff81eb95e9 ffff88019a45c800 ffffffff85616bb0 ffff88019a45d118 ffff88019a45d138 0000000000000000 ffff8801db207ac8 ffffffff81429ccd 0000000000000003 0000000000000001 ffff880100000000 Call Trace: [ 314.139181] [] __dump_stack lib/dump_stack.c:15 [inline] [ 314.139181] [] 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 [ 314.310045] [] ? arch_local_irq_restore arch/x86/include/asm/paravirt.h:768 [inline] [ 314.310045] [] ? buffered_rmqueue mm/page_alloc.c:2692 [inline] [ 314.310045] [] ? get_page_from_freelist+0xcbf/0x1a00 mm/page_alloc.c:2999 [] __alloc_pages_nodemask+0x237/0x700 mm/page_alloc.c:3843 [] __alloc_pages include/linux/gfp.h:433 [inline] [] __alloc_pages_node include/linux/gfp.h:446 [inline] [] alloc_pages_node include/linux/gfp.h:460 [inline] [] do_huge_pmd_anonymous_page+0x265/0x1140 mm/huge_memory.c:695 [] create_huge_pmd mm/memory.c:3438 [inline] [] __handle_mm_fault mm/memory.c:3588 [inline] [] handle_mm_fault+0x1b88/0x2a00 mm/memory.c:3649 [] __do_page_fault+0x5af/0xd50 arch/x86/mm/fault.c:1408 [] do_page_fault+0x27/0x30 arch/x86/mm/fault.c:1471 [] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:951 ================================================================== BUG: KASAN: use-after-free in l2tp_sock_to_tunnel net/l2tp/l2tp_core.h:234 [inline] BUG: KASAN: use-after-free in pppol2tp_sendmsg+0x681/0x790 net/l2tp/l2tp_ppp.c:304 Read of size 8 at addr ffff8801b74ccb50 by task syz-executor5/22915 CPU: 0 PID: 22915 Comm: syz-executor5 Tainted: G W 4.9.124-g09eb2ba #31 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801b8ddf8e0 ffffffff81eb95e9 ffffea0006dd3200 ffff8801b74ccb50 0000000000000000 ffff8801b74ccb50 ffff8801b74cc780 ffff8801b8ddf918 ffffffff8156c35e ffff8801b74ccb50 0000000000000008 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] 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_load8_noabort+0x14/0x20 mm/kasan/report.c:433 [] l2tp_sock_to_tunnel net/l2tp/l2tp_core.h:234 [inline] [] pppol2tp_sendmsg+0x681/0x790 net/l2tp/l2tp_ppp.c:304 [] sock_sendmsg_nosec net/socket.c:648 [inline] [] sock_sendmsg+0xcc/0x110 net/socket.c:658 [] ___sys_sendmsg+0x47a/0x840 net/socket.c:1982 [] __sys_sendmmsg+0x161/0x3d0 net/socket.c:2072 [] SYSC_sendmmsg net/socket.c:2103 [inline] [] SyS_sendmmsg+0x35/0x60 net/socket.c:2098 [] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282 [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Allocated by task 22909: 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 sk_prot_alloc+0x69/0x290 net/core/sock.c:1332 sk_alloc+0x3a/0x3a0 net/core/sock.c:1394 inet6_create+0x2d9/0xd80 net/ipv6/af_inet6.c:198 __sock_create+0x2f1/0x5f0 net/socket.c:1195 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 22916: 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 sk_prot_free net/core/sock.c:1375 [inline] __sk_destruct+0x3b9/0x590 net/core/sock.c:1455 __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 The buggy address belongs to the object at ffff8801b74cc780 which belongs to the cache UDPv6 of size 1496 The buggy address is located 976 bytes inside of 1496-byte region [ffff8801b74cc780, ffff8801b74ccd58) The buggy address belongs to the page: page:ffffea0006dd3200 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: ffff8801b74cca00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b74cca80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801b74ccb00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801b74ccb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801b74ccc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================