====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #297 Not tainted ------------------------------------------------------ syz-executor6/8826 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<0000000061150892>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (&xt[i].mutex){+.+.}, at: [<000000000ad20792>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1041 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&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:1041 xt_request_find_table_lock+0x28/0xc0 net/netfilter/x_tables.c:1088 get_info+0x154/0x690 net/ipv6/netfilter/ip6_tables.c:989 do_ipt_get_ctl+0x159/0xac0 net/ipv4/netfilter/ip_tables.c:1699 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ip_getsockopt+0x15c/0x220 net/ipv4/ip_sockglue.c:1571 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+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b -> #1 (sk_lock-AF_INET){+.+.}: lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xa0 net/ipv4/ip_sockglue.c:1252 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 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+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b -> #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 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 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 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+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b other info that might help us debug this: Chain exists of: rtnl_mutex --> sk_lock-AF_INET --> &xt[i].mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&xt[i].mutex); lock(sk_lock-AF_INET); lock(&xt[i].mutex); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor6/8826: #0: (&xt[i].mutex){+.+.}, at: [<000000000ad20792>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1041 stack backtrace: CPU: 0 PID: 8826 Comm: syz-executor6 Not tainted 4.15.0+ #297 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 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 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 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+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453299 RSP: 002b:00007f5d0079ac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bf58 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000016 RBP: 00000000000004d4 R08: 00000000000002e0 R09: 0000000000000000 R10: 0000000020777825 R11: 0000000000000212 R12: 00000000006f6480 R13: 00000000ffffffff R14: 00007f5d0079b6d4 R15: 0000000000000002 sctp: [Deprecated]: syz-executor3 (pid 8867) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor3 (pid 8888) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead *** Guest State *** CR0: actual=0x000000001ffffff0, shadow=0x000000007ffffff0, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000000 RIP = 0x0000000000008000 RFLAGS=0x00000002 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 CS: sel=0x3000, attr=0x08093, limit=0xffffffff, base=0x0000000000030000 DS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 SS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 ES: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 FS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 GS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 GDTR: limit=0x00000000, base=0x0000000000000000 LDTR: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 IDTR: limit=0x00000000, base=0x0000000000000000 TR: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000008 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811c99dc RSP = 0xffff8801d0a173b8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007ffa0a58a700 GSBase=ffff8801db400000 TRBase=fffffe0000003000 GDTBase=fffffe0000001000 IDTBase=fffffe0000000000 CR0=0000000080050033 CR3=00000001b62b5002 CR4=00000000001626f0 Sysenter RSP=fffffe0000002200 CS:RIP=0010:ffffffff85a019f0 EFER = 0x0000000000000d01 PAT = 0x0000000000000000 *** Control State *** PinBased=0000003f CPUBased=b699edfa SecondaryExec=000000c2 EntryControls=0000d1ff ExitControls=0023efff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000003 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffffd7125f859f EPT pointer = 0x00000001c1af801e binder: 8903 RLIMIT_NICE not set binder: 8903 RLIMIT_NICE not set binder: 8900:8903 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 8900:8903 unknown command 536907575 binder: 8900:8919 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 8900:8903 ioctl c0306201 20008fd0 returned -22 binder: 8919 RLIMIT_NICE not set binder: undelivered death notification, 0000000000000000 device lo entered promiscuous mode device lo left promiscuous mode device lo entered promiscuous mode device lo left promiscuous mode binder: undelivered death notification, 0000000000000000 binder: BINDER_SET_CONTEXT_MGR already set binder: 9094:9097 ioctl 40046207 0 returned -16 binder: undelivered death notification, 0000000000000000 cgroup: cgroup2: unknown option "" cgroup: cgroup2: unknown option "" binder: 9177:9187 ioctl c0306201 208b7000 returned -11 A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. binder: BINDER_SET_CONTEXT_MGR already set binder: 9177:9187 ioctl 40046207 0 returned -16 A link change request failed with some changes committed already. Interface lo may have been left with an inconsistent configuration, please check. device eql entered promiscuous mode netlink: 'syz-executor3': attribute type 3 has an invalid length. netlink: 'syz-executor3': attribute type 3 has an invalid length. autofs4:pid:9340:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(1.15866368), cmd(0x0000937e) autofs4:pid:9340:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) autofs4:pid:9344:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(1.15866368), cmd(0x0000937e) autofs4:pid:9344:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) rfkill: input handler disabled rfkill: input handler enabled sctp: [Deprecated]: syz-executor1 (pid 9362) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor1 (pid 9362) Use of int in maxseg socket option. Use struct sctp_assoc_value instead binder: 9393 RLIMIT_NICE not set binder: 9393 RLIMIT_NICE not set binder: 9393 RLIMIT_NICE not set binder_alloc: 9392: binder_alloc_buf size 9007199254741000 failed, no address space binder_alloc: allocated: 8 (num: 1 largest: 8), free: 8184 (num: 1 largest: 8184) binder: 9392:9393 transaction failed 29201/-28, size 0-8 line 2957 binder: send failed reply for transaction 39 to 9392:9401 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: 9393 RLIMIT_NICE not set binder: 9393 RLIMIT_NICE not set binder: 9392:9406 got reply transaction with no transaction stack binder: 9392:9406 transaction failed 29201/-71, size 0-8 line 2757 binder: release 9392:9393 transaction 42 in, still active binder: send failed reply for transaction 42 to 9392:9401 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 kauditd_printk_skb: 8 callbacks suppressed audit: type=1400 audit(1517835025.840:282): avc: denied { setopt } for pid=9509 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_netfilter_socket permissive=1 binder: 9552:9560 ioctl c018620b 20001000 returned -14 netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. binder: 9552:9582 ioctl c018620b 20001000 returned -14 sd 0:0:1:0: [sg0] tag#0 FAILED Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK sd 0:0:1:0: [sg0] tag#0 CDB: Test Unit Ready sd 0:0:1:0: [sg0] tag#0 CDB[00]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#0 CDB[10]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#0 CDB[20]: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 sd 0:0:1:0: [sg0] tag#0 CDB[30]: 00 00 00 binder_alloc: binder_alloc_mmap_handler: 9702 20db9000-20dba000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 9702:9709 ioctl 40046207 0 returned -16 binder: send failed reply for transaction 45 to 9702:9705 binder: undelivered TRANSACTION_ERROR: 29189 capability: warning: `syz-executor2' uses deprecated v2 capabilities in a way that may be insecure binder_alloc: binder_alloc_mmap_handler: 9817 20521000-20523000 already mapped failed -16 netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. encrypted_key: master key parameter '~‡zqé 7醭¯Y=lö¶2%£½œNVàZC3 ¢z~ÈâAH×<½\Ò5Z©©Qú²Âe' is invalid QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1326 audit(1517835028.270:283): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10050 comm="syz-executor6" exe="/root/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x0 audit: type=1326 audit(1517835028.315:284): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10050 comm="syz-executor6" exe="/root/syz-executor6" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x0 audit: type=1400 audit(1517835028.625:285): avc: denied { validate_trans } for pid=10182 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:security_t:s0 tclass=security permissive=1 audit: type=1401 audit(1517835028.627:286): op=fscreate invalid_context=1800000000000000000000000000000000000000000000 audit: type=1401 audit(1517835028.647:287): op=fscreate invalid_context=1800000000000000000000000000000000000000000000 x_tables: ip_tables: icmp match: only valid for protocol 1 audit: type=1400 audit(1517835029.475:288): avc: denied { setpcap } for pid=10429 comm="syz-executor6" capability=8 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 audit: type=1400 audit(1517835029.615:289): avc: denied { net_broadcast } for pid=10468 comm="syz-executor6" capability=11 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 audit: type=1326 audit(1517835029.818:290): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10517 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517835029.821:291): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=10517 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=230 compat=0 ip=0x453299 code=0x7ffc0000 device eql entered promiscuous mode netlink: 'syz-executor6': attribute type 21 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=962 sclass=netlink_route_socket pig=10647 comm=syz-executor6 netlink: 'syz-executor6': attribute type 21 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=962 sclass=netlink_route_socket pig=10647 comm=syz-executor6 x_tables: ip_tables: icmp match: only valid for protocol 1 x_tables: ip_tables: icmp match: only valid for protocol 1 device lo entered promiscuous mode tc_dump_action: action bad kind tc_dump_action: action bad kind binder: 10899:10907 got transaction with invalid data ptr sctp: [Deprecated]: syz-executor5 (pid 10918) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead binder: 10899:10907 transaction failed 29201/-14, size 32-8 line 2976 binder: BINDER_SET_CONTEXT_MGR already set sctp: [Deprecated]: syz-executor5 (pid 10918) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead binder: 10899:10921 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29201 device eql entered promiscuous mode device eql entered promiscuous mode device eql entered promiscuous mode device eql entered promiscuous mode