audit: type=1400 audit(1519809518.927:13): avc: denied { getopt } for pid=6207 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 ================================================================== BUG: KASAN: use-after-free in inet_shutdown+0x2e1/0x350 net/ipv4/af_inet.c:809 Read of size 4 at addr ffff8801d7e20880 by task syz-executor3/6224 CPU: 0 PID: 6224 Comm: syz-executor3 Not tainted 4.4.118-g239a415 #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 c227c9c2a473518a ffff8801c504fb58 ffffffff81d0402d ffffea00075f8800 ffff8801d7e20880 0000000000000000 ffff8801d7e20880 ffff8800a96fb6d8 ffff8801c504fb90 ffffffff814fe103 ffff8801d7e20880 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x73/0x260 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x285/0x370 mm/kasan/report.c:408 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] inet_shutdown+0x2e1/0x350 net/ipv4/af_inet.c:809 [] pppol2tp_session_close+0xa0/0xe0 net/l2tp/l2tp_ppp.c:458 [] l2tp_tunnel_closeall+0x21f/0x3b0 net/l2tp/l2tp_core.c:1274 [] l2tp_udp_encap_destroy+0x8b/0xf0 net/l2tp/l2tp_core.c:1300 [] udpv6_destroy_sock+0xb1/0xd0 net/ipv6/udp.c:1421 [] sk_common_release+0x6b/0x300 net/core/sock.c:2680 [] udp_lib_close+0x15/0x20 include/net/udp.h:190 [] inet_release+0xfa/0x1d0 net/ipv4/af_inet.c:435 [] inet6_release+0x50/0x70 net/ipv6/af_inet6.c:424 [] sock_release+0x8d/0x1e0 net/socket.c:586 [] sock_close+0x16/0x20 net/socket.c:1037 [] __fput+0x233/0x6d0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x104/0x180 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:252 [] prepare_exit_to_usermode arch/x86/entry/common.c:283 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:348 [inline] [] do_syscall_32_irqs_on arch/x86/entry/common.c:398 [inline] [] do_fast_syscall_32+0x614/0x8a0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 Allocated by task 6224: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xba/0x290 mm/slub.c:2628 [] sock_alloc_inode+0x1d/0x250 net/socket.c:250 [] alloc_inode+0x65/0x180 fs/inode.c:198 [] new_inode_pseudo+0x17/0xe0 fs/inode.c:878 [] sock_alloc+0x41/0x270 net/socket.c:555 [] __sock_create+0xa6/0x640 net/socket.c:1141 [] sock_create net/socket.c:1217 [inline] [] SYSC_socket net/socket.c:1247 [inline] [] SyS_socket+0xf0/0x1b0 net/socket.c:1227 [] do_syscall_32_irqs_on arch/x86/entry/common.c:392 [inline] [] do_fast_syscall_32+0x321/0x8a0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 Freed by task 6218: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kmem_cache_free+0xc7/0x320 mm/slub.c:2881 [] sock_destroy_inode+0x56/0x70 net/socket.c:280 [] destroy_inode+0xc0/0x110 fs/inode.c:255 [] evict+0x320/0x4e0 fs/inode.c:559 [] iput_final fs/inode.c:1477 [inline] [] iput+0x4a7/0x960 fs/inode.c:1504 [] dentry_iput fs/dcache.c:372 [inline] [] __dentry_kill+0x51c/0x620 fs/dcache.c:559 [] dentry_kill fs/dcache.c:603 [inline] [] dput.part.19+0x638/0x760 fs/dcache.c:813 [] dput+0x1f/0x30 fs/dcache.c:777 [] __fput+0x411/0x6d0 fs/file_table.c:226 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x104/0x180 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:252 [] prepare_exit_to_usermode arch/x86/entry/common.c:283 [inline] [] syscall_return_slowpath arch/x86/entry/common.c:348 [inline] [] do_syscall_32_irqs_on arch/x86/entry/common.c:398 [inline] [] do_fast_syscall_32+0x614/0x8a0 arch/x86/entry/common.c:459 [] sysenter_flags_fixed+0xd/0x17 The buggy address belongs to the object at ffff8801d7e20880 which belongs to the cache sock_inode_cache of size 920 The buggy address is located 0 bytes inside of 920-byte region [ffff8801d7e20880, ffff8801d7e20c18) The buggy address belongs to the page: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 3866 at kernel/locking/lockdep.c:3190 __lock_acquire+0x23b3/0x4b50 kernel/locking/lockdep.c:3190() DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS)