audit: type=1400 audit(1518804953.200:27): avc: denied { map_create } for pid=5488 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 ====================================================== WARNING: possible circular locking dependency detected audit: type=1400 audit(1518804953.233:28): avc: denied { prog_load } for pid=5488 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor0/5502 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<00000000cab6b2fb>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<00000000cab6b2fb>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<0000000081a7cf37>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 which lock already depends on the new lock. binder: 5516:5519 got transaction to invalid handle the existing dependency chain (in reverse order) is: -> #2 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 unregister_netdevice_notifier+0x91/0x4e0 net/core/dev.c:1673 binder: 5516:5519 transaction failed 29201/-22, size 48-80 line 2842 tee_tg_destroy+0x61/0xc0 net/netfilter/xt_TEE.c:123 cleanup_entry+0x218/0x350 net/ipv4/netfilter/ip_tables.c:654 __do_replace+0x79d/0xa50 net/ipv4/netfilter/ip_tables.c:1089 do_replace net/ipv4/netfilter/ip_tables.c:1145 [inline] do_ipt_set_ctl+0x40f/0x5f0 net/ipv4/netfilter/ip_tables.c:1675 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1259 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 ipv6_setsockopt+0xa0/0x130 net/ipv6/ipv6_sockglue.c:917 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 sctp: failed to load transform for md5: -2 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 ( audit: type=1400 audit(1518804953.352:29): avc: denied { transfer } for pid=5516 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1 &xt[i].mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 xt_request_find_table_lock+0x28/0xc0 net/netfilter/x_tables.c:1093 binder: 5516 invalid dec weak, ref 9 desc 0 s 1 w 0 get_info+0x154/0x690 net/ipv6/netfilter/ip6_tables.c:989 do_ip6t_get_ctl+0x159/0xaf0 net/ipv6/netfilter/ip6_tables.c:1710 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1df/0x2e0 net/ipv6/ipv6_sockglue.c:1371 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2934 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (sk_lock-AF_INET6){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: sk_lock-AF_INET6 --> &xt[i].mutex --> rtnl_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&xt[i].mutex); lock(rtnl_mutex); lock(sk_lock-AF_INET6); *** DEADLOCK *** 1 lock held by syz-executor0/5502: #0: (rtnl_mutex){+.+.}, at: [<0000000081a7cf37>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5502 Comm: syz-executor0 Not tainted 4.16.0-rc1+ #315 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_circular_bug.isra.38+0x2cd/0x2dc kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007f7a8a451c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f7a8a4526d4 RCX: 0000000000453a59 RDX: 000000000000002a RSI: 0000000000000029 RDI: 0000000000000013 RBP: 000000000071bf58 R08: 0000000000000088 R09: 0000000000000000 R10: 0000000020000f78 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004fb R14: 00000000006f7828 R15: 0000000000000001 sctp: failed to load transform for md5: -2 binder: release 5516:5519 transaction 6 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 6, target dead 9pnet_virtio: no channels available for device ./file0 audit: type=1400 audit(1518804954.311:30): avc: denied { map } for pid=5564 comm="syz-executor4" path=2F616E6F6E5F6875676570616765202864656C6574656429 dev="hugetlbfs" ino=15903 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:hugetlbfs_t:s0 tclass=file permissive=1 9pnet_virtio: no channels available for device ./file0 dccp_xmit_packet: Payload too large (65423) for featneg. sctp: [Deprecated]: syz-executor6 (pid 5602) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead audit: type=1400 audit(1518804954.585:31): avc: denied { ipc_lock } for pid=5599 comm="syz-executor5" capability=14 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 sctp: [Deprecated]: syz-executor6 (pid 5618) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead audit: type=1400 audit(1518804954.648:32): avc: denied { map_read map_write } for pid=5622 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 IPv6: Can't replace route, no match found IPv6: Can't replace route, no match found QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium openvswitch: netlink: Key type 16382 is out of range max 29 openvswitch: netlink: Key type 16382 is out of range max 29 tmpfs: Bad mount option ,4MÏÄ7ö³É tmpfs: Bad mount option ,4MÏÄ7ö³É FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 6922 Comm: syz-executor4 Not tainted 4.16.0-rc1+ #315 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc_trace+0x4b/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] htab_map_alloc+0xae/0x1020 kernel/bpf/hashtab.c:311 find_and_alloc_map kernel/bpf/syscall.c:121 [inline] map_create kernel/bpf/syscall.c:439 [inline] SYSC_bpf kernel/bpf/syscall.c:1866 [inline] SyS_bpf+0x93b/0x4860 kernel/bpf/syscall.c:1843 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007f9ed4689c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f9ed468a6d4 RCX: 0000000000453a59 RDX: 000000000000002c RSI: 0000000020fc7000 RDI: 0000000000000000 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 000000000000003c R14: 00000000006f0640 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 6989 Comm: syz-executor2 Not tainted 4.16.0-rc1+ #315 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3539 kmem_cache_zalloc include/linux/slab.h:691 [inline] ext4_init_io_end+0x8e/0x200 fs/ext4/page-io.c:253 ext4_writepages+0x1229/0x3c30 fs/ext4/inode.c:2823 do_writepages+0xff/0x170 mm/page-writeback.c:2340 __filemap_fdatawrite_range+0x32f/0x460 mm/filemap.c:444 file_write_and_wait_range+0x8a/0x100 mm/filemap.c:752 ext4_sync_file+0x4fb/0x1260 fs/ext4/fsync.c:128 vfs_fsync_range+0x110/0x260 fs/sync.c:196 SYSC_msync mm/msync.c:90 [inline] SyS_msync+0x2be/0x3c0 mm/msync.c:32 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007fc53c1a4c68 EFLAGS: 00000246 ORIG_RAX: 000000000000001a RAX: ffffffffffffffda RBX: 00007fc53c1a56d4 RCX: 0000000000453a59 RDX: 0000000000000004 RSI: 087abbe8d1cc6ad9 RDI: 0000000020952000 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000003f3 R14: 00000000006f5f68 R15: 0000000000000000 binder: 7021 RLIMIT_NICE not set binder: 7054 RLIMIT_NICE not set binder: 7054 RLIMIT_NICE not set binder: BINDER_SET_CONTEXT_MGR already set binder: 7037:7054 ioctl 40046207 0 returned -16 binder_alloc: 7037: binder_alloc_buf, no vma binder: 7037:7071 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 7037:7054 transaction 11 in, still active binder: send failed reply for transaction 11 to 7037:7071 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 kauditd_printk_skb: 4 callbacks suppressed audit: type=1400 audit(1518804960.549:37): avc: denied { getattr } for pid=7146 comm="syz-executor3" 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 audit: type=1400 audit(1518804960.580:38): avc: denied { setopt } for pid=7146 comm="syz-executor3" 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 audit: type=1400 audit(1518804960.952:39): avc: denied { map } for pid=7284 comm="syz-executor1" path=2F6D656D66643A37E6278E0F077E786B0993E761F63E2EB39451EDF3ADF26ACDC7F8BA1C3976D4A10A20A0869B17FEC8B3941F0D24B444BD05202864656C6574656429 dev="tmpfs" ino=19892 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1518804961.048:40): avc: denied { map } for pid=7307 comm="syz-executor3" path="/dev/snd/pcmC0D0c" dev="devtmpfs" ino=9071 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sound_device_t:s0 tclass=chr_file permissive=1 audit: type=1400 audit(1518804961.194:41): avc: denied { ioctl } for pid=7357 comm="syz-executor7" path="socket:[20703]" dev="sockfs" ino=20703 ioctlcmd=0x541d scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 netlink: 'syz-executor3': attribute type 1 has an invalid length. audit: type=1400 audit(1518804961.316:42): avc: denied { ioctl } for pid=7392 comm="syz-executor3" path="socket:[20728]" dev="sockfs" ino=20728 ioctlcmd=0x5878 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 netlink: 'syz-executor3': attribute type 1 has an invalid length. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 4146 Comm: udevd Not tainted 4.16.0-rc1+ #315 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:native_write_cr4+0x4/0x10 arch/x86/include/asm/special_insns.h:76 RSP: 0018:ffff8801db507ca8 EFLAGS: 00010006 RAX: ffff8801cb432000 RBX: 00000000001606e0 RCX: ffffffff811a56b2 RDX: 0000000000010000 RSI: 0000000000000000 RDI: 00000000001606e0 RBP: ffff8801db507ca8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000006 R13: ffff8801db51d0e8 R14: ffff8801db51d130 R15: ffff8801db51d130 FS: 00007f850da3e7a0(0000) GS:ffff8801db500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f850da45000 CR3: 00000001b3b20001 CR4: 00000000001626e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __write_cr4 arch/x86/include/asm/paravirt.h:76 [inline] __cr4_set arch/x86/include/asm/tlbflush.h:254 [inline] cr4_clear_bits arch/x86/include/asm/tlbflush.h:277 [inline] kvm_cpu_vmxoff arch/x86/kvm/vmx.c:3645 [inline] hardware_disable+0x34a/0x4b0 arch/x86/kvm/vmx.c:3651 kvm_arch_hardware_disable+0x35/0xd0 arch/x86/kvm/x86.c:8194 hardware_disable_nolock+0x30/0x40 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3290 flush_smp_call_function_queue+0x1f4/0x570 kernel/smp.c:243 generic_smp_call_function_single_interrupt+0x13/0x30 kernel/smp.c:192 smp_call_function_single_interrupt+0x103/0x640 arch/x86/kernel/smp.c:295 call_function_single_interrupt+0x8e/0xa0 arch/x86/entry/entry_64.S:818 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:777 [inline] RIP: 0010:qlink_free mm/kasan/quarantine.c:150 [inline] RIP: 0010:qlist_free_all+0xa9/0x160 mm/kasan/quarantine.c:166 RSP: 0018:ffff8801b439fad0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff04 RAX: 0000000000000003 RBX: 0000000000000282 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffffe8ffffd01310 RDI: 0000000000000282 RBP: ffff8801b439fb08 R08: ffffea0007388fe0 R09: ffff88021fffa000 R10: ffff8801b439f708 R11: ffffffff881cb720 R12: 0000000000000000 R13: ffff8801db131500 R14: ffff8801db3608a0 R15: ffffffff86ac96a0 quarantine_reduce+0x141/0x170 mm/kasan/quarantine.c:259 kasan_kmalloc+0xca/0xe0 mm/kasan/kasan.c:537 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 slab_post_alloc_hook mm/slab.h:443 [inline] slab_alloc mm/slab.c:3379 [inline] kmem_cache_alloc+0x11b/0x760 mm/slab.c:3539 getname_flags+0xcb/0x580 fs/namei.c:138 user_path_at_empty+0x2d/0x50 fs/namei.c:2568 user_path_at include/linux/namei.h:57 [inline] do_utimes+0x1f1/0x2b0 fs/utimes.c:152 SYSC_utimensat fs/utimes.c:184 [inline] SyS_utimensat+0x101/0x1a0 fs/utimes.c:168 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x7f850d147a32 RSP: 002b:00007ffd81ef91b8 EFLAGS: 00000206 ORIG_RAX: 0000000000000118 RAX: ffffffffffffffda RBX: 000000000184e030 RCX: 00007f850d147a32 RDX: 0000000000000000 RSI: 00007ffd81ef9ba0 RDI: ffffffffffffff9c RBP: 00007ffd81ef9ba0 R08: 0000000000000000 R09: 0000000000001fff R10: 0000000000000100 R11: 0000000000000206 R12: 00000000019decc0 R13: 00000000ffffffea R14: 00007ffd81ef9300 R15: 00007ffd81ef9700 Code: 0f 1f 80 00 00 00 00 55 48 89 e5 0f 20 d8 5d c3 0f 1f 80 00 00 00 00 55 48 89 e5 0f 22 df 5d c3 0f 1f 80 00 00 00 00 55 48 89 e5 <0f> 22 e7 5d c3 0f 1f 80 00 00 00 00 55 48 89 e5 44 0f 20 c0 5d RIP: native_write_cr4+0x4/0x10 arch/x86/include/asm/special_insns.h:76 RSP: ffff8801db507ca8 ---[ end trace 84b3d8b5b1aa026d ]---