====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #287 Not tainted ------------------------------------------------------ syz-executor0/6766 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<00000000358e4044>] lock_sock include/net/sock.h:1459 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000358e4044>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000251f0d1d>] 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_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1562 udp_getsockopt+0x45/0x80 net/ipv4/udp.c:2480 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-executor0/6766: #0: (rtnl_mutex){+.+.}, at: [<00000000251f0d1d>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72 stack backtrace: CPU: 1 PID: 6766 Comm: syz-executor0 Not tainted 4.15.0+ #287 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_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1331 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1562 udp_getsockopt+0x45/0x80 net/ipv4/udp.c:2480 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:00007f63d2757c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 00000000000005d1 R08: 0000000020004000 R09: 0000000000000000 R10: 0000000020008000 R11: 0000000000000212 R12: 00000000006f7c38 R13: 00000000ffffffff R14: 00007f63d27586d4 R15: 0000000000000000 QAT: Invalid ioctl IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready Protocol error: SET target dimension is over the limit! Protocol error: SET target dimension is over the limit! Cannot find del_set index 0 as target Cannot find del_set index 0 as target netlink: 'syz-executor7': attribute type 4 has an invalid length. netlink: 'syz-executor7': attribute type 4 has an invalid length. device eql entered promiscuous mode kernel msg: ebtables bug: please report to author: Wrong len argument kernel msg: ebtables bug: please report to author: Wrong len argument do_dccp_setsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app do_dccp_setsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app openvswitch: netlink: Message has 4 unknown bytes. openvswitch: netlink: Message has 4 unknown bytes. print_req_error: I/O error, dev loop0, sector 680 Buffer I/O error on dev loop0, logical block 85, lost async page write sg_write: data in/out 700410/16 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/16 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly mip6: mip6_rthdr_init_state: spi is not 0: 3607363584 device eql entered promiscuous mode mip6: mip6_rthdr_init_state: spi is not 0: 3607363584 sctp: [Deprecated]: syz-executor4 (pid 7548) Use of int in maxseg socket option. Use struct sctp_assoc_value instead PPPIOCDETACH file->f_count=2 sctp: [Deprecated]: syz-executor4 (pid 7562) Use of int in maxseg socket option. Use struct sctp_assoc_value instead kauditd_printk_skb: 65 callbacks suppressed audit: type=1400 audit(1517393007.296:265): avc: denied { dyntransition } for pid=7576 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0 tclass=process permissive=1 audit: type=1400 audit(1517393007.356:266): avc: denied { net_admin } for pid=7581 comm="syz-executor4" capability=12 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(1517393007.436:267): avc: denied { setgid } for pid=7617 comm="syz-executor3" capability=6 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_alloc: 7617: binder_alloc_buf, no vma binder: 7617:7623 transaction failed 29189/-3, size 40-0 line 2903 binder: BINDER_SET_CONTEXT_MGR already set binder: 7617:7623 ioctl 40046207 0 returned -16 binder_alloc: 7617: binder_alloc_buf, no vma binder: 7617:7623 transaction failed 29189/-3, size 40-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1400 audit(1517393007.473:268): avc: denied { net_raw } for pid=7617 comm="syz-executor3" capability=13 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(1517393007.532:269): avc: denied { ipc_owner } for pid=7640 comm="syz-executor3" capability=15 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(1517393007.545:270): avc: denied { dac_read_search } for pid=7638 comm="syz-executor6" capability=2 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(1517393007.671:271): avc: denied { map } for pid=7647 comm="syz-executor6" path="/dev/rtc0" dev="devtmpfs" ino=1073 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:clock_device_t:s0 tclass=chr_file permissive=1 audit: type=1400 audit(1517393007.754:272): avc: denied { setfcap } for pid=7680 comm="syz-executor4" capability=31 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(1517393007.763:273): avc: denied { dac_override } for pid=7680 comm="syz-executor4" capability=1 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 syz-executor2 (7692) used greatest stack depth: 16208 bytes left audit: type=1400 audit(1517393007.775:274): avc: denied { sys_admin } for pid=7684 comm="syz-executor6" capability=21 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 netlink: 8 bytes leftover after parsing attributes in process `syz-executor0'. capability: warning: `syz-executor2' uses deprecated v2 capabilities in a way that may be insecure dccp_close: ABORT with 4294967275 bytes unread dccp_close: ABORT with 4294967275 bytes unread dccp_close: ABORT with 4294967275 bytes unread binder: 7981:7984 got new transaction with bad transaction stack, transaction 15 has target 7981:0 binder: 7981:7984 transaction failed 29201/-71, size 0-0 line 2815 binder: BINDER_SET_CONTEXT_MGR already set binder: 7981:7999 ioctl 40046207 0 returned -16 binder_alloc: 7981: binder_alloc_buf, no vma binder: 7981:7999 transaction failed 29189/-3, size 0-0 line 2903 binder_alloc: 7981: binder_alloc_buf, no vma binder: 7981:7984 transaction failed 29189/-3, size 40-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 7981:7984 transaction 15 out, still active binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29201 binder: send failed reply for transaction 15, target dead syz-executor6 (8033): attempted to duplicate a private mapping with mremap. This is not supported. snd_dummy snd_dummy.0: control 120:0:0::0 is already present binder: 8179:8180 ioctl c0306201 20003000 returned -14 binder: 8179:8185 ioctl c0306201 20003000 returned -14 QAT: Invalid ioctl QAT: Invalid ioctl binder: 8337:8347 ioctl c0306201 20003000 returned -14 QAT: Invalid ioctl QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=6 nlmsg_type=0 sclass=netlink_xfrm_socket pig=8495 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=0 sclass=netlink_xfrm_socket pig=8504 comm=syz-executor7 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor5': attribute type 2 has an invalid length. netlink: 'syz-executor5': attribute type 2 has an invalid length. handle_userfault: 93 callbacks suppressed FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 1 PID: 8825 Comm: syz-executor4 Not tainted 4.15.0+ #287 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 handle_userfault+0x12fa/0x24c0 fs/userfaultfd.c:427 do_anonymous_page mm/memory.c:3127 [inline] handle_pte_fault mm/memory.c:3941 [inline] __handle_mm_fault+0x32a3/0x3ce0 mm/memory.c:4067 handle_mm_fault+0x334/0x8d0 mm/memory.c:4104 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1426 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1501 page_fault+0x2c/0x60 arch/x86/entry/entry_64.S:1261 RIP: 0010:fault_in_pages_readable include/linux/pagemap.h:601 [inline] RIP: 0010:iov_iter_fault_in_readable+0x1a7/0x410 lib/iov_iter.c:421 RSP: 0018:ffff8801b389f928 EFLAGS: 00010246 RAX: 0000000000010000 RBX: 0000000020011fd2 RCX: ffffffff825952f1 RDX: 0000000000000100 RSI: ffffc90001c54000 RDI: ffff8801b389fd28 RBP: ffff8801b389fa08 R08: 0000000000000000 R09: 1ffff10036713ed1 R10: ffff8801b389f858 R11: ffff8801b54601a0 R12: 1ffff10036713f28 R13: ffff8801b389f9e0 R14: 0000000000000000 R15: ffff8801b389fd20 generic_perform_write+0x200/0x600 mm/filemap.c:3129 __generic_file_write_iter+0x366/0x5b0 mm/filemap.c:3264 generic_file_write_iter+0x399/0x790 mm/filemap.c:3292 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 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:00007fdc8f415c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fdc8f416700 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000020011fd2 RDI: 0000000000000014 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f33f R14: 00007fdc8f4169c0 R15: 0000000000000000 binder: 8846:8847 unknown command 0 FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 1 PID: 8838 Comm: syz-executor4 Not tainted 4.15.0+ #287 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 handle_userfault+0x12fa/0x24c0 fs/userfaultfd.c:427 do_anonymous_page mm/memory.c:3127 [inline] handle_pte_fault mm/memory.c:3941 [inline] __handle_mm_fault+0x32a3/0x3ce0 mm/memory.c:4067 handle_mm_fault+0x334/0x8d0 mm/memory.c:4104 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1426 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1501 page_fault+0x2c/0x60 arch/x86/entry/entry_64.S:1261 RIP: 0010:fault_in_pages_readable include/linux/pagemap.h:601 [inline] RIP: 0010:iov_iter_fault_in_readable+0x1a7/0x410 lib/iov_iter.c:421 RSP: 0018:ffff8801ab88f928 EFLAGS: 00010246 RAX: 0000000000010000 RBX: 0000000020011fd2 RCX: ffffffff825952f1 RDX: 00000000000000a6 RSI: ffffc90001cd5000 RDI: ffff8801ab88fd28 RBP: ffff8801ab88fa08 R08: 1ffff100358a607a R09: 1ffff10035711f1a R10: ffff8801ab88fa50 R11: ffffffff8813c088 R12: 1ffff10035711f28 R13: ffff8801ab88f9e0 R14: 0000000000000000 R15: ffff8801ab88fd20 generic_perform_write+0x200/0x600 mm/filemap.c:3129 __generic_file_write_iter+0x366/0x5b0 mm/filemap.c:3264 generic_file_write_iter+0x399/0x790 mm/filemap.c:3292 call_write_iter include/linux/fs.h:1772 [inline] new_sync_write fs/read_write.c:469 [inline] __vfs_write+0x684/0x970 fs/read_write.c:482 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:00007fdc8f3f4c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000071bf58 RCX: 0000000000453299 RDX: 0000000000000030 RSI: 0000000020011fd2 RDI: 0000000000000016 RBP: 00000000000005a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f7800 R13: 00000000ffffffff R14: 00007fdc8f3f56d4 R15: 000000000000000a binder: 8846:8866 unknown command 0 binder: 8846:8866 ioctl c0306201 20976000 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 8846:8857 ioctl 40046207 0 returned -16 binder: 8846:8847 ioctl c0306201 20976000 returned -22 sock: sock_set_timeout: `syz-executor6' (pid 8923) tries to set negative timeout sock: sock_set_timeout: `syz-executor6' (pid 8923) tries to set negative timeout