====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor4/5578 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<000000007eeebcc9>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<000000007eeebcc9>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000c2229c3c>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 which lock already depends on the new lock. 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 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 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 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 -> #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 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 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 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-executor4/5578: #0: (rtnl_mutex){+.+.}, at: [<00000000c2229c3c>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5578 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 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 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 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:00007fc7795d7c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fc7795d86d4 RCX: 0000000000453a59 RDX: 0000000000000030 RSI: 0000000000000029 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000090 R09: 0000000000000000 R10: 00000000206ae000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004fd R14: 00000000006f7858 R15: 0000000000000000 audit: type=1400 audit(1518814957.494:28): avc: denied { call } for pid=5639 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=binder permissive=1 audit: type=1400 audit(1518814957.518:29): avc: denied { transfer } for pid=5639 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=binder permissive=1 binder: 5639:5642 BC_FREE_BUFFER u00000000204edf8a no match binder_alloc: binder_alloc_mmap_handler: 5639 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 5639:5642 ioctl 40046207 0 returned -16 binder_alloc: 5639: binder_alloc_buf, no vma binder: 5639:5662 transaction failed 29189/-3, size 40-8 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 5639:5642 transaction 5 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 5, target dead binder: undelivered transaction 8, process died. dccp_invalid_packet: P.type (REQUEST) not Data || [Data]Ack, while P.X == 0 binder: 5768 invalid dec weak, ref 14 desc 0 s 1 w 0 binder_alloc: binder_alloc_mmap_handler: 5768 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 5768:5769 ioctl 40046207 0 returned -16 binder_alloc: 5768: binder_alloc_buf, no vma binder: 5768:5776 transaction failed 29189/-3, size 40-8 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 5768:5769 transaction 11 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 11, target dead QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor7': attribute type 3 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor7': attribute type 3 has an invalid length. binder_alloc: binder_alloc_mmap_handler: 5815 20661000-20662000 already mapped failed -16 binder_alloc: binder_alloc_mmap_handler: 5815 20000000-20002000 already mapped failed -16 QAT: Invalid ioctl QAT: Invalid ioctl netlink: 28 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 28 bytes leftover after parsing attributes in process `syz-executor2'. x_tables: ip_tables: ah match: only valid for protocol 51 x_tables: ip_tables: ah match: only valid for protocol 51 syz7: Invalid MTU 65536 requested, hw max 65521 encrypted_key: insufficient parameters specified encrypted_key: insufficient parameters specified binder: 6258:6262 transaction failed 29189/-22, size 0-0 line 2842 binder: 6258:6279 transaction failed 29189/-22, size 0-0 line 2842 IPVS: ftp: loaded support on port[0] = 21 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready binder: 6528 RLIMIT_NICE not set Protocol error: SET target dimension is over the limit! Protocol error: SET target dimension is over the limit! binder: undelivered death notification, 0000000000000000 QAT: Invalid ioctl kauditd_printk_skb: 6 callbacks suppressed audit: type=1400 audit(1518814961.123:36): avc: denied { create } for pid=6609 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_iscsi_socket permissive=1 binder: 6647:6656 ioctl 40046205 41d returned -22 IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready audit: type=1400 audit(1518814961.602:37): avc: denied { ipc_lock } for pid=6737 comm="syz-executor2" 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 xt_connbytes: Forcing CT accounting to be enabled IPVS: ftp: loaded support on port[0] = 21 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready --map-set only usable from mangle table audit: type=1400 audit(1518814964.593:38): avc: denied { name_bind } for pid=7046 comm="syz-executor5" src=20020 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1518814964.594:39): avc: denied { node_bind } for pid=7046 comm="syz-executor5" saddr=::1 src=20020 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1518814964.630:40): avc: denied { name_connect } for pid=7046 comm="syz-executor5" dest=20020 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 syz-executor7 uses obsolete (PF_INET,SOCK_PACKET) device eql entered promiscuous mode rpcbind: RPC call returned error 22 Cannot find add_set index 0 as target binder: 7201:7203 got transaction with invalid offsets size, 986 binder: 7201:7203 transaction failed 29201/-22, size 40-986 line 2993 Cannot find add_set index 0 as target audit: type=1400 audit(1518814965.091:41): avc: denied { setopt } for pid=7205 comm="syz-executor7" 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 binder_alloc: binder_alloc_mmap_handler: 7201 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 7201: binder_alloc_buf, no vma binder: 7201:7203 ioctl 40046207 0 returned -16 binder: 7201:7217 transaction failed 29189/-3, size 40-986 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 SELinux: policydb magic number 0x0 does not match expected magic number 0xf97cff8c SELinux: failed to load policy dccp_xmit_packet: Payload too large (65423) for featneg. SELinux: policydb magic number 0x0 does not match expected magic number 0xf97cff8c SELinux: failed to load policy l2tp_core: tunl 2: fd 19 wrong protocol, got 1, expected 17 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 7366 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+0x47/0x760 mm/slab.c:3539 getname_flags+0xcb/0x580 fs/namei.c:138 getname+0x19/0x20 fs/namei.c:209 do_sys_open+0x2e7/0x6d0 fs/open.c:1053 SYSC_open fs/open.c:1077 [inline] SyS_open+0x2d/0x40 fs/open.c:1072 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x40dd51 RSP: 002b:00007fc7795d77a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: cccccccccccccccd RCX: 000000000040dd51 RDX: 0000000000000000 RSI: 0000000000000081 RDI: 00007fc7795d7850 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000207d3000 R11: 0000000000000293 R12: 0000000000000014 R13: 0000000000000623 R14: 00000000006f93e8 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 7399 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+0x47/0x760 mm/slab.c:3539 kmem_cache_zalloc include/linux/slab.h:691 [inline] get_empty_filp+0xfb/0x4f0 fs/file_table.c:122 path_openat+0xed/0x3530 fs/namei.c:3495 do_filp_open+0x25b/0x3b0 fs/namei.c:3553 do_sys_open+0x502/0x6d0 fs/open.c:1059 SYSC_open fs/open.c:1077 [inline] SyS_open+0x2d/0x40 fs/open.c:1072 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x40dd51 RSP: 002b:00007fc7795d77a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: cccccccccccccccd RCX: 000000000040dd51 RDX: 0000000000000000 RSI: 0000000000000081 RDI: 00007fc7795d7850 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000207d3000 R11: 0000000000000293 R12: 0000000000000014 R13: 0000000000000623 R14: 00000000006f93e8 R15: 0000000000000001 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 7432 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+0x47/0x760 mm/slab.c:3539 kmem_cache_zalloc include/linux/slab.h:691 [inline] file_alloc_security security/selinux/hooks.c:369 [inline] selinux_file_alloc_security+0xae/0x190 security/selinux/hooks.c:3454 security_file_alloc+0x6d/0xa0 security/security.c:873 get_empty_filp+0x189/0x4f0 fs/file_table.c:128 path_openat+0xed/0x3530 fs/namei.c:3495 do_filp_open+0x25b/0x3b0 fs/namei.c:3553 do_sys_open+0x502/0x6d0 fs/open.c:1059 SYSC_open fs/open.c:1077 [inline] SyS_open+0x2d/0x40 fs/open.c:1072 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287