====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #297 Not tainted ------------------------------------------------------ syz-executor1/23815 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000b0bfd523>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (&xt[i].mutex){+.+.}, at: [<00000000b2227f1d>] 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_ip6t_get_ctl+0x159/0xaf0 net/ipv6/netfilter/ip6_tables.c:1710 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1df/0x2e0 net/ipv6/ipv6_sockglue.c:1371 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_INET6){+.+.}: lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 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_INET6 --> &xt[i].mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&xt[i].mutex); lock(sk_lock-AF_INET6); lock(&xt[i].mutex); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor1/23815: #0: (&xt[i].mutex){+.+.}, at: [<00000000b2227f1d>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1041 stack backtrace: CPU: 1 PID: 23815 Comm: syz-executor1 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:00007f097c0e7c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000015 RBP: 00000000000004d4 R08: 00000000000002e0 R09: 0000000000000000 R10: 0000000020777825 R11: 0000000000000212 R12: 00000000006f6480 R13: 00000000ffffffff R14: 00007f097c0e86d4 R15: 0000000000000000 binder: BINDER_SET_CONTEXT_MGR already set binder: 23826:23830 ioctl 40046207 0 returned -16 binder: 23826:23840 ioctl c0306201 20013fd0 returned -14 binder: 23826:23830 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 23830 RLIMIT_NICE not set binder: 23826:23840 BC_DEAD_BINDER_DONE 0000000000000000 not found binder: 23826:23840 got transaction to invalid handle binder: 23826:23840 transaction failed 29201/-22, size 0-0 line 2842 binder: BINDER_SET_CONTEXT_MGR already set binder: 23826:23867 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 23826:23873 ioctl 40046207 0 returned -16 binder: 23826:23840 ioctl c0306201 20013fd0 returned -14 binder: 23826:23864 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: undelivered TRANSACTION_ERROR: 29201 netlink: 16 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor0'. irq bypass consumer (token 000000000a98a79b) registration fails: -16 binder: 24308:24319 ioctl 4b2f 7 returned -22 binder: send failed reply for transaction 101 to 24308:24319 binder: 24308:24319 ioctl 4b2f 7 returned -22 binder: send failed reply for transaction 103 to 24308:24319 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 netlink: 'syz-executor6': attribute type 1 has an invalid length. netlink: 'syz-executor6': attribute type 1 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl kernel msg: ebtables bug: please report to author: Wrong len argument device eql entered promiscuous mode audit: type=1400 audit(1517834277.667:686): avc: denied { net_bind_service } for pid=1590 comm="kworker/1:1H" capability=10 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=cap_userns permissive=1 xt_policy: too many policy elements netlink: 'syz-executor2': attribute type 21 has an invalid length. netlink: 'syz-executor2': attribute type 21 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl openvswitch: netlink: Flow get message rejected, Key attribute missing. openvswitch: netlink: Flow get message rejected, Key attribute missing. xt_HMARK: proto mask must be zero with L3 mode audit: type=1326 audit(1517834279.969:687): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.994:688): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=27 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.995:689): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.995:690): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=9 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.997:691): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.997:692): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=41 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.997:693): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.999:694): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=257 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517834279.999:695): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=25013 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 netlink: 'syz-executor1': attribute type 33 has an invalid length. netlink: 'syz-executor1': attribute type 33 has an invalid length. device eql entered promiscuous mode device bridge0 entered promiscuous mode device bridge0 left promiscuous mode FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 25532 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3539 getname_flags+0xcb/0x580 fs/namei.c:138 getname fs/namei.c:209 [inline] SYSC_renameat2 fs/namei.c:4510 [inline] SyS_renameat2 fs/namei.c:4481 [inline] SYSC_rename fs/namei.c:4632 [inline] SyS_rename+0x220/0xc90 fs/namei.c:4630 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453299 RSP: 002b:00007f917eb6fc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020ab5ff6 RDI: 00000000200f2ff8 RBP: 0000000000000475 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f5b98 R13: 0000000000000015 R14: 00007f917eb706d4 R15: ffffffffffffffff FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 25560 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2955 [inline] prepare_alloc_pages mm/page_alloc.c:4194 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4233 __alloc_pages include/linux/gfp.h:456 [inline] __alloc_pages_node include/linux/gfp.h:469 [inline] kmem_getpages mm/slab.c:1410 [inline] cache_grow_begin+0x72/0x570 mm/slab.c:2665 cache_alloc_refill mm/slab.c:3032 [inline] ____cache_alloc mm/slab.c:3114 [inline] __do_cache_alloc mm/slab.c:3336 [inline] slab_alloc mm/slab.c:3371 [inline] kmem_cache_alloc+0x400/0x760 mm/slab.c:3539 getname_flags+0xcb/0x580 fs/namei.c:138 getname fs/namei.c:209 [inline] SYSC_renameat2 fs/namei.c:4510 [inline] SyS_renameat2 fs/namei.c:4481 [inline] SYSC_rename fs/namei.c:4632 [inline] SyS_rename+0x220/0xc90 fs/namei.c:4630 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453299 RSP: 002b:00007f917eb6fc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000052 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020ab5ff6 RDI: 00000000200f2ff8 RBP: 0000000000000475 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f5b98 R13: 0000000000000015 R14: 00007f917eb706d4 R15: ffffffffffffffff binder: 25729 RLIMIT_NICE not set binder: BINDER_SET_CONTEXT_MGR already set binder: 25717:25730 ioctl 40046207 0 returned -16 binder: 25729 RLIMIT_NICE not set binder_alloc: 25717: binder_alloc_buf, no vma binder: 25717:25731 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered transaction 105, process died. binder: undelivered TRANSACTION_COMPLETE