====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #290 Not tainted ------------------------------------------------------ syz-executor1/9340 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000e5b1c737>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (sk_lock-AF_INET){+.+.}, at: [<000000002c68c2c3>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000002c68c2c3>] ip_setsockopt+0x8c/0xb0 net/ipv4/ip_sockglue.c:1259 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+.}: lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1252 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (rtnl_mutex){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __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 register_netdevice_notifier+0xad/0x860 net/core/dev.c:1607 tee_tg_check+0x1a0/0x280 net/netfilter/xt_TEE.c:106 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:513 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:554 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:725 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x370/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+0xa1/0xb0 net/ipv4/ip_sockglue.c:1260 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor1/9340: #0: (sk_lock-AF_INET){+.+.}, at: [<000000002c68c2c3>] lock_sock include/net/sock.h:1461 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [<000000002c68c2c3>] ip_setsockopt+0x8c/0xb0 net/ipv4/ip_sockglue.c:1259 stack backtrace: CPU: 1 PID: 9340 Comm: syz-executor1 Not tainted 4.15.0+ #290 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 __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 register_netdevice_notifier+0xad/0x860 net/core/dev.c:1607 tee_tg_check+0x1a0/0x280 net/netfilter/xt_TEE.c:106 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:513 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:554 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:725 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x370/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+0xa1/0xb0 net/ipv4/ip_sockglue.c:1260 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f96e8d3ec58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000621 R08: 00000000000002e0 R09: 0000000000000000 R10: 000000002002ccf8 R11: 0000000000000212 R12: 00000000006f83b8 R13: 00000000ffffffff R14: 00007f96e8d3f6d4 R15: 0000000000000000 irq bypass consumer (token 0000000011c79164) registration fails: -16 ieee80211 phy4: Selected rate control algorithm 'minstrel_ht' ieee80211 phy5: Selected rate control algorithm 'minstrel_ht' SELinux: policydb version -423176716 does not match my version range 15-31 SELinux: failed to load policy SELinux: policydb version -423176716 does not match my version range 15-31 SELinux: failed to load policy IPv4: Oversized IP packet from 127.0.0.1 kauditd_printk_skb: 172 callbacks suppressed audit: type=1400 audit(1517489218.708:618): avc: denied { getrlimit } for pid=9792 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=process permissive=1 binder: 9819:9828 Release 1 refcount change on invalid ref 0 ret -22 binder_alloc: binder_alloc_mmap_handler: 9819 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 9819:9828 ioctl 40046207 0 returned -16 binder_alloc: 9819: binder_alloc_buf, no vma binder: 9819:9842 transaction failed 29189/-3, size 40-8 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 9819:9828 transaction 43 out, still active binder: send failed reply for transaction 43, target dead binder: undelivered transaction 46, process died. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1517489219.265:619): avc: denied { setattr } for pid=9980 comm="syz-executor4" name="NETLINK" dev="sockfs" ino=25451 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1 netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. audit: type=1400 audit(1517489219.760:620): avc: denied { create } for pid=10136 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_connector_socket permissive=1 netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor0': attribute type 1 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. IPVS: ftp: loaded support on port[0] = 21 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready audit: type=1326 audit(1517489222.927:621): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489222.928:622): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489222.928:623): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=257 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489222.928:624): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489222.928:625): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489222.929:626): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=55 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489222.929:627): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10699 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 SELinux: unrecognized netlink message: protocol=9 nlmsg_type=29 sclass=netlink_audit_socket pig=10880 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=9 nlmsg_type=29 sclass=netlink_audit_socket pig=10880 comm=syz-executor6 SELinux: failed to load policy syz-executor7: vmalloc: allocation failure: 0 bytes, mode:0x14000c0(GFP_KERNEL), nodemask=(null) syz-executor7 cpuset=/ mems_allowed=0 CPU: 1 PID: 10896 Comm: syz-executor7 Not tainted 4.15.0+ #290 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 warn_alloc+0x19a/0x2b0 mm/page_alloc.c:3306 __vmalloc_node_range+0x4f0/0x650 mm/vmalloc.c:1775 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0x45/0x50 mm/vmalloc.c:1840 sel_write_load+0x1f5/0x1910 security/selinux/selinuxfs.c:495 __vfs_write+0xef/0x970 fs/read_write.c:480 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f81dc4f0c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 00000000200f8fd1 RDI: 0000000000000013 RBP: 0000000000000609 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f8178 R13: 00000000ffffffff R14: 00007f81dc4f16d4 R15: 0000000000000000 Mem-Info: active_anon:67598 inactive_anon:63 isolated_anon:0 active_file:3585 inactive_file:8331 isolated_file:0 unevictable:0 dirty:130 writeback:0 unstable:0 slab_reclaimable:8861 slab_unreclaimable:90805 mapped:24140 shmem:69 pagetables:785 bounce:0 free:1422823 free_pcp:405 free_cma:0 Node 0 active_anon:270392kB inactive_anon:252kB active_file:14340kB inactive_file:33324kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:96560kB dirty:520kB writeback:0kB shmem:276kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 51200kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Node 0 DMA free:15908kB min:164kB low:204kB high:244kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB lowmem_reserve[]: 0 2868 6378 6378 Node 0 DMA32 free:2939140kB min:30316kB low:37892kB high:45468kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3129292kB managed:2939968kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:828kB local_pcp:664kB free_cma:0kB lowmem_reserve[]: 0 0 3510 3510 Node 0 Normal free:2736244kB min:37100kB low:46372kB high:55644kB active_anon:270392kB inactive_anon:252kB active_file:14340kB inactive_file:33324kB unevictable:0kB writepending:520kB present:4718592kB managed:3594332kB mlocked:0kB kernel_stack:4416kB pagetables:3140kB bounce:0kB free_pcp:768kB local_pcp:572kB free_cma:0kB lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 1*4kB (U) 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15908kB Node 0 DMA32: 3*4kB (UM) 3*8kB (UM) 4*16kB (UM) 3*32kB (UM) 1*64kB (M) 2*128kB (M) 3*256kB (UM) 4*512kB (UM) 3*1024kB (UM) 2*2048kB (UM) 715*4096kB (M) = 2939140kB Node 0 Normal: 1449*4kB (ME) 1586*8kB (UME) 1836*16kB (UME) 1537*32kB (UME) 633*64kB (UME) 340*128kB (UM) 79*256kB (UM) 15*512kB (UME) 22*1024kB (UM) 5*2048kB (UM) 609*4096kB (UM) = 2736212kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 11984 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965969 pages RAM 0 pages HighMem/MovableOnly 328417 pages reserved NFS: bad mount option value specified: vs SELinux: failed to load policy syz-executor7: vmalloc: allocation failure: 0 bytes, mode:0x14000c0(GFP_KERNEL), nodemask=(null) syz-executor7 cpuset=/ mems_allowed=0 CPU: 1 PID: 10896 Comm: syz-executor7 Not tainted 4.15.0+ #290 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 warn_alloc+0x19a/0x2b0 mm/page_alloc.c:3306 __vmalloc_node_range+0x4f0/0x650 mm/vmalloc.c:1775 __vmalloc_node mm/vmalloc.c:1804 [inline] __vmalloc_node_flags mm/vmalloc.c:1818 [inline] vmalloc+0x45/0x50 mm/vmalloc.c:1840 sel_write_load+0x1f5/0x1910 security/selinux/selinuxfs.c:495 __vfs_write+0xef/0x970 fs/read_write.c:480 vfs_write+0x189/0x510 fs/read_write.c:544 SYSC_write fs/read_write.c:589 [inline] SyS_write+0xef/0x220 fs/read_write.c:581 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f81dc4f0c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 00000000200f8fd1 RDI: 0000000000000016 RBP: 00000000000003d6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f4cb0 R13: 00000000ffffffff R14: 00007f81dc4f16d4 R15: 0000000000000000 NFS: bad mount option value specified: vs netlink: 416 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 416 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 'syz-executor5': attribute type 8 has an invalid length. netlink: 'syz-executor5': attribute type 8 has an invalid length. binder: 11309:11311 ioctl c0306201 20003000 returned -14 binder: 11309:11324 ioctl c0306201 20003000 returned -14 kauditd_printk_skb: 110 callbacks suppressed audit: type=1326 audit(1517489225.749:738): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.750:739): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=64 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.750:740): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.751:741): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=16 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.751:742): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.752:743): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=143 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.752:744): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11315 comm="syz-executor1" exe="/root/syz-executor1" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.752:745): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11308 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.758:746): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11308 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=16 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489225.758:747): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=11308 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 netlink: 24 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor1'.