====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc9+ #283 Not tainted ------------------------------------------------------ syz-executor6/6064 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<0000000082096e5e>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000082096e5e>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000007a77c265>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (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:72 register_netdevice_notifier+0xad/0x860 net/core/dev.c:1590 clusterip_config_init net/ipv4/netfilter/ipt_CLUSTERIP.c:261 [inline] clusterip_tg_check+0xeb9/0x1570 net/ipv4/netfilter/ipt_CLUSTERIP.c:478 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:518 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:559 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:730 do_replace net/ipv4/netfilter/ip_tables.c:1148 [inline] do_ipt_set_ctl+0x370/0x5f0 net/ipv4/netfilter/ip_tables.c:1682 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0xa1/0xb0 net/ipv4/ip_sockglue.c:1256 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:857 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2968 SYSC_setsockopt net/socket.c:1831 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1810 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (sk_lock-AF_INET){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 lock_sock_nested+0xc2/0x110 net/core/sock.c:2770 lock_sock include/net/sock.h:1461 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1562 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3329 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2927 SYSC_getsockopt net/socket.c:1862 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1844 entry_SYSCALL_64_fastpath+0x29/0xa0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); *** DEADLOCK *** 1 lock held by syz-executor6/6064: #0: (rtnl_mutex){+.+.}, at: [<000000007a77c265>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 stack backtrace: CPU: 1 PID: 6064 Comm: syz-executor6 Not tainted 4.15.0-rc9+ #283 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.37+0x2cd/0x2dc kernel/locking/lockdep.c:1218 check_prev_add kernel/locking/lockdep.c:1858 [inline] check_prevs_add kernel/locking/lockdep.c:1971 [inline] validate_chain kernel/locking/lockdep.c:2412 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3426 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3914 lock_sock_nested+0xc2/0x110 net/core/sock.c:2770 lock_sock include/net/sock.h:1461 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1562 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3329 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2927 SYSC_getsockopt net/socket.c:1862 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1844 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f6812302c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000000000bb R08: 0000000020fae000 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000212 R12: 00000000006f0228 R13: 00000000ffffffff R14: 00007f68123036d4 R15: 0000000000000000 binder: 6073:6075 transaction failed 29189/-22, size 0-0 line 2788 binder: 6073:6075 transaction failed 29189/-22, size 0-0 line 2788 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 x_tables: ip_tables: .0 target: invalid size 8 (kernel) != (user) 3 x_tables: ip_tables: .0 target: invalid size 8 (kernel) != (user) 3 binder: BINDER_SET_CONTEXT_MGR already set binder: 6382:6391 ioctl 40046207 0 returned -16 binder: 6382:6384 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor7': attribute type 1 has an invalid length. netlink: 'syz-executor7': attribute type 1 has an invalid length. cgroup: cgroup2: unknown option "" cgroup: cgroup2: unknown option "" mmap: syz-executor6 (6616): VmData 15065088 exceed data ulimit 0. Update limits or use boot option ignore_rlimit_data. binder: 6708:6712 BC_FREE_BUFFER uffffffffffffffff no match binder: 6708:6726 BC_INCREFS_DONE u0000000000000000 node 8 cookie mismatch 0000000000000001 != 0000000000000000 binder: 6708:6712 unknown command 0 binder: BINDER_SET_CONTEXT_MGR already set binder: 6708:6726 ioctl 40046207 0 returned -16 binder_alloc: 6708: binder_alloc_buf, no vma binder: 6708:6726 transaction failed 29189/-3, size 40-8 line 2903 binder: 6708:6726 BC_FREE_BUFFER uffffffffffffffff no match binder: 6708:6726 BC_CLEAR_DEATH_NOTIFICATION invalid ref 4 binder: 6708:6726 got transaction to invalid handle binder: 6708:6726 transaction failed 29201/-22, size 32-0 line 2788 binder: 6708:6734 BC_INCREFS_DONE u0000000000000000 no match binder: 6708:6712 ioctl c0306201 20a49000 returned -22 binder: undelivered TRANSACTION_ERROR: 29201 binder: release 6708:6712 transaction 9 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 9, target dead binder: undelivered TRANSACTION_ERROR: 29189 kauditd_printk_skb: 119 callbacks suppressed audit: type=1400 audit(1517111262.025:205): avc: denied { map } for pid=6744 comm="syz-executor5" path="/dev/loop0" dev="devtmpfs" ino=1152 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file permissive=1 audit: type=1400 audit(1517111262.262:206): avc: denied { create } for pid=6815 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=netlink_fib_lookup_socket permissive=1 netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. audit: type=1400 audit(1517111262.265:207): avc: denied { write } for pid=6815 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=netlink_fib_lookup_socket permissive=1 netlink: 1 bytes leftover after parsing attributes in process `syz-executor4'. audit: type=1400 audit(1517111262.268:208): avc: denied { read } for pid=6815 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=netlink_fib_lookup_socket permissive=1 QAT: Invalid ioctl xt_recent: Unsupported user space flags (00000076) xt_recent: Unsupported user space flags (00000076) QAT: Invalid ioctl SELinux: failed to load policy x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 audit: type=1400 audit(1517111263.964:209): avc: denied { setopt } for pid=7140 comm="syz-executor4" 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 autofs4:pid:7213:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(3590324411.0), cmd(0x0000937e) autofs4:pid:7213:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) autofs4:pid:7214:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(3590324411.0), cmd(0x0000937e) autofs4:pid:7214:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) Cannot find set identified by id 0 to match audit: type=1400 audit(1517111264.188:210): avc: denied { fsetid } for pid=7229 comm="syz-executor5" capability=4 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 Cannot find set identified by id 0 to match binder_alloc: binder_alloc_mmap_handler: 7288 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 7288:7297 ioctl 40046207 0 returned -16 binder_alloc: 7288: binder_alloc_buf, no vma binder: 7288:7322 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 7288:7297 transaction 17 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 17, target dead xt_connbytes: Forcing CT accounting to be enabled audit: type=1326 audit(1517111264.738:211): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7396 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517111264.763:212): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7396 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517111264.771:213): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7396 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=118 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517111264.772:214): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7396 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 capability: warning: `syz-executor4' uses deprecated v2 capabilities in a way that may be insecure netlink: 9 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 9 bytes leftover after parsing attributes in process `syz-executor1'. binder: BINDER_SET_CONTEXT_MGR already set binder: 7796:7802 ioctl 40046207 0 returned -16 binder_alloc: 7796: binder_alloc_buf, no vma binder: 7796:7798 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 20 to 7796:7798 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 ptrace attach of "/root/syz-executor6"[3727] was attempted by "/root/syz-executor6"[7935] device eql entered promiscuous mode device syz1 entered promiscuous mode device syz1 left promiscuous mode netlink: 'syz-executor1': attribute type 4 has an invalid length. netlink: 17 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 'syz-executor1': attribute type 4 has an invalid length. netlink: 17 bytes leftover after parsing attributes in process `syz-executor1'. IPv6: : Disabled Multicast RS kauditd_printk_skb: 114 callbacks suppressed audit: type=1400 audit(1517111267.667:329): avc: denied { ioctl } for pid=8298 comm="syz-executor4" path="socket:[24535]" dev="sockfs" ino=24535 ioctlcmd=0x8940 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 audit: type=1400 audit(1517111267.691:330): avc: denied { read } for pid=8298 comm="syz-executor4" 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 audit: type=1400 audit(1517111268.130:331): avc: denied { read } for pid=8441 comm="syz-executor4" 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 autofs4:pid:8448:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(1.4294967294), cmd(0x0000937e) autofs4:pid:8448:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) autofs4:pid:8453:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(1.4294967294), cmd(0x0000937e) autofs4:pid:8453:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) audit: type=1400 audit(1517111268.287:332): avc: denied { write } for pid=8469 comm="syz-executor2" name="net" dev="proc" ino=25930 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1517111268.287:333): avc: denied { add_name } for pid=8469 comm="syz-executor2" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1517111268.287:334): avc: denied { create } for pid=8469 comm="syz-executor2" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:insmod_t:s0 tclass=file permissive=1 audit: type=1326 audit(1517111268.404:335): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=8486 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff40000 audit: type=1326 audit(1517111268.442:336): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=8486 comm="syz-executor4" exe="/root/syz-executor4" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff40000