====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #288 Not tainted ------------------------------------------------------ syz-executor5/5881 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<00000000580ac76b>] lock_sock include/net/sock.h:1459 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000580ac76b>] do_ip_setsockopt.isra.12+0x1d9/0x32e0 net/ipv4/ip_sockglue.c:646 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000002f5e02f5>] 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 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:1143 [inline] do_ipt_set_ctl+0x370/0x5f0 net/ipv4/netfilter/ip_tables.c:1677 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:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2770 lock_sock include/net/sock.h:1459 [inline] do_ip_setsockopt.isra.12+0x1d9/0x32e0 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1248 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2875 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 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-executor5/5881: #0: (rtnl_mutex){+.+.}, at: [<000000002f5e02f5>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 stack backtrace: CPU: 1 PID: 5881 Comm: syz-executor5 Not tainted 4.15.0+ #288 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:2770 lock_sock include/net/sock.h:1459 [inline] do_ip_setsockopt.isra.12+0x1d9/0x32e0 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1248 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2875 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 RIP: 0033:0x453299 RSP: 002b:00007f02ab886c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071c010 RCX: 0000000000453299 RDX: 000000000000002d RSI: 0000000000000000 RDI: 0000000000000014 RBP: 0000000000000028 R08: 0000000000000090 R09: 0000000000000000 R10: 00000000205a4000 R11: 0000000000000212 R12: 00000000006ef460 R13: 00000000ffffffff R14: 00007f02ab8876d4 R15: 000000000000000b capability: warning: `syz-executor7' uses 32-bit capabilities (legacy support in use) device syz3 entered promiscuous mode device syz3 left promiscuous mode QAT: Invalid ioctl irq bypass consumer (token 00000000ff6ebde2) registration fails: -16 QAT: Invalid ioctl binder: 5952:5954 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 5952:5954 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 5952:5954 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: 5952:5954 Acquire 1 refcount change on invalid ref 0 ret -22 syz-executor1 (5958) used greatest stack depth: 15280 bytes left binder: 5952:5973 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 syz-executor3 uses obsolete (PF_INET,SOCK_PACKET) xt_addrtype: both incoming and outgoing interface limitation cannot be selected xt_addrtype: both incoming and outgoing interface limitation cannot be selected TCP: request_sock_TCP: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. SELinux: unrecognized netlink message: protocol=4 nlmsg_type=17 sclass=netlink_tcpdiag_socket pig=6252 comm=syz-executor2 netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. kauditd_printk_skb: 57 callbacks suppressed audit: type=1400 audit(1517436322.518:81): avc: denied { set_context_mgr } for pid=6338 comm="syz-executor6" 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 capability: warning: `syz-executor0' uses deprecated v2 capabilities in a way that may be insecure binder: 6338:6340 BC_FREE_BUFFER u00000000204edf8a no match binder: BINDER_SET_CONTEXT_MGR already set binder: 6338:6340 ioctl 40046207 0 returned -16 binder_alloc: 6338: binder_alloc_buf, no vma binder: 6338:6356 transaction failed 29189/-3, size 80-8 line 2903 audit: type=1400 audit(1517436322.552:82): avc: denied { call } for pid=6338 comm="syz-executor6" 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: undelivered TRANSACTION_ERROR: 29189 binder: release 6338:6340 transaction 4 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 4, target dead audit: type=1400 audit(1517436322.553:83): avc: denied { transfer } for pid=6338 comm="syz-executor6" 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: 6388:6391 transaction failed 29189/-22, size 0-8 line 2788 binder: 6386:6392 got new transaction with bad transaction stack, transaction 10 has target 6386:0 binder: 6386:6392 transaction failed 29201/-71, size 0-0 line 2815 binder_alloc: binder_alloc_mmap_handler: 6386 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6386:6392 ioctl 40046207 0 returned -16 binder_alloc: 6386: binder_alloc_buf, no vma binder: 6386:6398 transaction failed 29189/-3, size 40-8 line 2903 binder: 6386:6392 got transaction to invalid handle binder: 6386:6392 transaction failed 29201/-22, size 0-0 line 2788 binder_alloc: 6386: binder_alloc_buf, no vma binder: 6388:6395 transaction failed 29189/-3, size 0-8 line 2903 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6386:6392 transaction 10 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 10, target dead audit: type=1400 audit(1517436322.655:84): avc: denied { write } for pid=6361 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(1517436322.750:85): avc: denied { accept } for pid=6400 comm="syz-executor5" 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(1517436323.267:86): avc: denied { validate_trans } for pid=6522 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=1326 audit(1517436323.909:87): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6571 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517436323.931:88): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6571 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517436323.938:89): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6571 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=70 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517436323.938:90): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6571 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 QAT: Invalid ioctl QAT: Invalid ioctl binder_alloc: binder_alloc_mmap_handler: 6683 20a3f000-20a40000 already mapped failed -16 netlink: 11 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor7'. TCP: request_sock_TCP: Possible SYN flooding on port 20030. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl mmap: syz-executor4 (7184) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. dccp_close: ABORT with 8210 bytes unread encrypted_key: master key parameter 'SRb ]I 2" J`dp Jz~ˏ6=X匄K?L' is invalid encrypted_key: master key parameter 'SRb ]I 2" J`dp Jz~ˏ6=X匄K?L' is invalid device eql entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl kauditd_printk_skb: 165 callbacks suppressed audit: type=1326 audit(1517436327.518:256): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.519:257): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.519:258): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.519:259): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.519:260): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.519:261): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.520:262): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.520:263): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.520:264): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 audit: type=1326 audit(1517436327.520:265): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7654 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ff00000 netlink: 'syz-executor2': attribute type 3 has an invalid length. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. xt_HMARK: hash modulus can't be zero QAT: Invalid ioctl QAT: Invalid ioctl