====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #285 Not tainted ------------------------------------------------------ syz-executor2/6211 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<00000000606bd2f6>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000606bd2f6>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<000000005d1829b1>] 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: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:3915 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-executor2/6211: #0: (rtnl_mutex){+.+.}, at: [<000000005d1829b1>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 stack backtrace: CPU: 1 PID: 6211 Comm: syz-executor2 Not tainted 4.15.0+ #285 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:1219 check_prev_add kernel/locking/lockdep.c:1859 [inline] check_prevs_add kernel/locking/lockdep.c:1972 [inline] validate_chain kernel/locking/lockdep.c:2413 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3427 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3915 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:00007fd5dc9d2c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000610 R08: 0000000020745000 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000212 R12: 00000000006f8220 R13: 00000000ffffffff R14: 00007fd5dc9d36d4 R15: 0000000000000000 bridge0: port 1(syz4) entered blocking state bridge0: port 1(syz4) entered disabled state kauditd_printk_skb: 54 callbacks suppressed audit: type=1400 audit(1517282394.301:78): avc: denied { map } for pid=6261 comm="syz-executor0" path=2F6D656D66643A64657620202864656C6574656429 dev="tmpfs" ino=18435 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 QAT: Invalid ioctl device syz4 entered promiscuous mode bridge0: port 1(syz4) entered blocking state bridge0: port 1(syz4) entered forwarding state IPv6: ADDRCONF(NETDEV_CHANGE): bridge0: link becomes ready audit: type=1400 audit(1517282394.418:79): avc: denied { read } for pid=6279 comm="syz-executor4" path="socket:[18456]" dev="sockfs" ino=18456 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 IPv4: Oversized IP packet from 127.0.0.1 audit: type=1400 audit(1517282394.773:80): avc: denied { map } for pid=6376 comm="syz-executor7" path="/dev/binder7" dev="devtmpfs" ino=148 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 binder: BINDER_SET_CONTEXT_MGR already set binder: 6376:6383 ioctl 40046207 0 returned -16 binder_alloc: 6376: binder_alloc_buf, no vma binder: 6376:6383 transaction failed 29189/-3, size 40-8 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6376:6379 transaction 2 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 2, target dead audit: type=1400 audit(1517282394.773:81): avc: denied { set_context_mgr } for pid=6376 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=binder permissive=1 netlink: 'syz-executor5': attribute type 21 has an invalid length. audit: type=1400 audit(1517282394.773:82): avc: denied { call } for pid=6376 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=binder permissive=1 audit: type=1400 audit(1517282394.773:83): avc: denied { transfer } for pid=6376 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=binder permissive=1 binder: 6450:6451 BC_FREE_BUFFER u0000000000000000 no match audit: type=1400 audit(1517282395.111:84): avc: denied { sys_chroot } for pid=6449 comm="syz-executor1" capability=18 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 binder: 6450:6471 BC_FREE_BUFFER u0000000000000000 no match audit: type=1326 audit(1517282395.343:85): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6520 comm="syz-executor5" exe="/root/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x0 audit: type=1326 audit(1517282395.437:86): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6520 comm="syz-executor5" exe="/root/syz-executor5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x0 device eql entered promiscuous mode tmpfs: No value for mount option ',4' tmpfs: No value for mount option ',4' binder_alloc: binder_alloc_mmap_handler: 6704 20265000-20279000 already mapped failed -16 audit: type=1326 audit(1517282396.042:87): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6707 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 binder_alloc: 6704: binder_alloc_buf size 65360 failed, no address space binder_alloc: allocated: 0 (num: 0 largest: 0), free: 16384 (num: 1 largest: 16384) binder: 6704:6708 transaction failed 29201/-28, size 65351-8 line 2903 binder_alloc: 6704: binder_alloc_buf size 58536 failed, no address space binder_alloc: allocated: 0 (num: 0 largest: 0), free: 16384 (num: 1 largest: 16384) binder: 6704:6728 transaction failed 29201/-28, size 0-0 line 2903 binder_alloc: binder_alloc_mmap_handler: 6704 20132000-20136000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6704:6728 ioctl 40046207 0 returned -16 binder_alloc: 6704: binder_alloc_buf, no vma binder: 6704:6728 transaction failed 29189/-3, size 65351-8 line 2903 binder_alloc: 6704: binder_alloc_buf, no vma binder: 6704:6708 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29201 binder: undelivered TRANSACTION_ERROR: 29189 binder: 6770:6771 transaction failed 29189/-22, size 0-0 line 2788 binder: 6770:6777 transaction failed 29189/-22, size 0-0 line 2788 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app sctp: [Deprecated]: syz-executor7 (pid 6825) Use of int in max_burst socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor7 (pid 6832) Use of int in max_burst socket option. Use struct sctp_assoc_value instead NFS: bad mount option value specified: vs NFS: bad mount option value specified: vs device eql entered promiscuous mode futex_wake_op: syz-executor1 tries to shift op by -1; fix this program futex_wake_op: syz-executor1 tries to shift op by -1; fix this program