xt_CT: You must specify a L4 protocol, and not use inversions on it. ============================= WARNING: suspicious RCU usage 4.15.0+ #308 Not tainted ----------------------------- ./include/linux/rcupdate.h:302 Illegal context switch in RCU read-side critical section! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by syz-executor6/5524: #0: (rcu_read_lock){....}, at: [<000000003e86c75f>] __rds_conn_create+0xe46/0x1b50 net/rds/connection.c:218 stack backtrace: CPU: 1 PID: 5524 Comm: syz-executor6 Not tainted 4.15.0+ #308 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 lockdep_rcu_suspicious+0x123/0x170 kernel/locking/lockdep.c:4592 rcu_preempt_sleep_check include/linux/rcupdate.h:301 [inline] ___might_sleep+0x385/0x470 kernel/sched/core.c:6093 __might_sleep+0x95/0x190 kernel/sched/core.c:6081 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc+0x2a2/0x760 mm/slab.c:3539 rds_tcp_conn_alloc+0xa7/0x4e0 net/rds/tcp.c:296 __rds_conn_create+0x112f/0x1b50 net/rds/connection.c:227 rds_conn_create_outgoing+0x3f/0x50 net/rds/connection.c:309 rds_sendmsg+0xda3/0x2390 net/rds/send.c:1126 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2046 __sys_sendmsg+0xe5/0x210 net/socket.c:2080 SYSC_sendmsg net/socket.c:2091 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2087 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453a59 RSP: 002b:00007f29f631bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f29f631c6d4 RCX: 0000000000453a59 RDX: 0000000000000000 RSI: 0000000020006fc8 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004b5 R14: 00000000006f7198 R15: 0000000000000000 BUG: sleeping function called from invalid context at mm/slab.h:420 in_atomic(): 1, irqs_disabled(): 0, pid: 5524, name: syz-executor6 1 lock held by syz-executor6/5524: #0: (rcu_read_lock){....}, at: [<000000003e86c75f>] __rds_conn_create+0xe46/0x1b50 net/rds/connection.c:218 CPU: 1 PID: 5524 Comm: syz-executor6 Not tainted 4.15.0+ #308 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 ___might_sleep+0x2b2/0x470 kernel/sched/core.c:6128 __might_sleep+0x95/0x190 kernel/sched/core.c:6081 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3365 [inline] kmem_cache_alloc+0x2a2/0x760 mm/slab.c:3539 rds_tcp_conn_alloc+0xa7/0x4e0 net/rds/tcp.c:296 __rds_conn_create+0x112f/0x1b50 net/rds/connection.c:227 rds_conn_create_outgoing+0x3f/0x50 net/rds/connection.c:309 rds_sendmsg+0xda3/0x2390 net/rds/send.c:1126 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2046 __sys_sendmsg+0xe5/0x210 net/socket.c:2080 SYSC_sendmsg net/socket.c:2091 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2087 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453a59 RSP: 002b:00007f29f631bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f29f631c6d4 RCX: 0000000000453a59 RDX: 0000000000000000 RSI: 0000000020006fc8 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004b5 R14: 00000000006f7198 R15: 0000000000000000 mmap: syz-executor0 (5598) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. ipt_REJECT: TCP_RESET invalid for non-tcp ipt_REJECT: TCP_RESET invalid for non-tcp SELinux: unrecognized netlink message: protocol=4 nlmsg_type=26 sclass=netlink_tcpdiag_socket pig=5752 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=26 sclass=netlink_tcpdiag_socket pig=5760 comm=syz-executor7 capability: warning: `syz-executor6' uses 32-bit capabilities (legacy support in use) netlink: 'syz-executor7': attribute type 18 has an invalid length. netlink: 'syz-executor7': attribute type 18 has an invalid length. sock: sock_set_timeout: `syz-executor5' (pid 5890) tries to set negative timeout binder: release 5898:5903 transaction 2 out, still active binder: undelivered TRANSACTION_COMPLETE sock: sock_set_timeout: `syz-executor5' (pid 5890) tries to set negative timeout binder: BINDER_SET_CONTEXT_MGR already set binder: 5898:5920 ioctl 40046207 0 returned -16 binder_alloc: 5898: binder_alloc_buf, no vma binder: 5898:5903 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 2, target dead binder: 5974:5976 ioctl c018620b 2009cfe8 returned -14 binder: 5974:5976 ioctl c018620b 2009cfe8 returned -14 xt_connbytes: Forcing CT accounting to be enabled Cannot find add_set index 0 as target Cannot find add_set index 0 as target device eql entered promiscuous mode QAT: Invalid ioctl netlink: 'syz-executor3': attribute type 18 has an invalid length. netlink: 'syz-executor3': attribute type 18 has an invalid length. QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=6 nlmsg_type=1025 sclass=netlink_xfrm_socket pig=6204 comm=syz-executor3 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1025 sclass=netlink_route_socket pig=6209 comm=syz-executor3 xt_HL: invalid or unknown mode 3 syz7: FDB only supports static addresses syz7: FDB only supports static addresses kauditd_printk_skb: 22 callbacks suppressed audit: type=1400 audit(1518378830.368:50): avc: denied { map } for pid=6512 comm="syz-executor3" path="pipe:[17778]" dev="pipefs" ino=17778 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1 audit: type=1400 audit(1518378830.479:51): avc: denied { write } for pid=6551 comm="syz-executor3" name="net" dev="proc" ino=16999 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1518378830.480:52): avc: denied { add_name } for pid=6551 comm="syz-executor3" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1518378830.481:53): avc: denied { create } for pid=6551 comm="syz-executor3" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:insmod_t:s0 tclass=file permissive=1 QAT: Invalid ioctl syz-executor4 uses obsolete (PF_INET,SOCK_PACKET) device eql entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1518378831.774:54): avc: denied { transfer } for pid=6637 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: BINDER_SET_CONTEXT_MGR already set binder: BINDER_SET_CONTEXT_MGR already set binder: 6637:6652 ioctl 40046207 0 returned -16 binder: 6622:6635 ioctl 40046207 0 returned -16 binder_alloc: 6637: binder_alloc_buf, no vma binder: 6637:6640 transaction failed 29189/-3, size 40-8 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6637:6640 transaction 5 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 5, target dead QAT: Invalid ioctl QAT: Invalid ioctl raw_sendmsg: syz-executor7 forgot to set AF_INET. Fix it! QAT: Invalid ioctl syz-executor7 (6708) used greatest stack depth: 16240 bytes left x_tables: ip_tables: TPROXY target: used from hooks PREROUTING/INPUT/FORWARD/POSTROUTING, but only usable from PREROUTING x_tables: ip_tables: TPROXY target: used from hooks PREROUTING/INPUT/FORWARD/POSTROUTING, but only usable from PREROUTING netlink: 80 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 80 bytes leftover after parsing attributes in process `syz-executor6'. syz-executor5 (6898): /proc/6894/oom_adj is deprecated, please use /proc/6894/oom_score_adj instead. ion_ioctl: ioctl validate failed sg_write: data in/out 2012/24 bytes for SCSI command 0x0-- guessing data in; program syz-executor1 not setting count and/or reply_len properly sg_write: data in/out 2012/24 bytes for SCSI command 0x0-- guessing data in; program syz-executor1 not setting count and/or reply_len properly x_tables: ip_tables: set.4 match: invalid size 48 (kernel) != (user) 40 x_tables: ip6_tables: CT.2 target: invalid size 72 (kernel) != (user) 41 x_tables: ip6_tables: CT.2 target: invalid size 72 (kernel) != (user) 41 device eql entered promiscuous mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=60950 sclass=netlink_route_socket pig=7125 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=60950 sclass=netlink_route_socket pig=7125 comm=syz-executor7 xt_CT: You must specify a L4 protocol, and not use inversions on it. xt_CT: You must specify a L4 protocol, and not use inversions on it. FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 1 PID: 7156 Comm: syz-executor5 Tainted: G W 4.15.0+ #308 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+0xbd9/0x2500 fs/userfaultfd.c:430 do_anonymous_page mm/memory.c:3163 [inline] handle_pte_fault mm/memory.c:3977 [inline] __handle_mm_fault+0x32a3/0x3ce0 mm/memory.c:4103 handle_mm_fault+0x35c/0x970 mm/memory.c:4140 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1426 do_page_fault+0xee/0x730 arch/x86/mm/fault.c:1501 page_fault+0x2c/0x60 arch/x86/entry/entry_64.S:1155 RIP: 0010:copy_user_generic_unrolled+0x86/0xc0 arch/x86/lib/copy_user_64.S:65 RSP: 0018:ffff8801b6607d20 EFLAGS: 00010202 RAX: ffffed0036cc0fb4 RBX: 0000000020013ff8 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000020013ff8 RDI: ffff8801b6607d98 RBP: ffff8801b6607d50 R08: ffffed0036cc0fb4 R09: ffffed0036cc0fb4 R10: 0000000000000001 R11: ffffed0036cc0fb3 R12: 0000000000000008 R13: ffff8801b6607d98 R14: 00007ffffffff000 R15: 0000000020014000 copy_from_user include/linux/uaccess.h:147 [inline] SYSC_signalfd4 fs/signalfd.c:264 [inline] SyS_signalfd4+0xb0/0x470 fs/signalfd.c:250 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453a59 RSP: 002b:00007f69e19b9c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000121 RAX: ffffffffffffffda RBX: 00007f69e19ba6d4 RCX: 0000000000453a59 RDX: 0000000000000008 RSI: 0000000020013ff8 RDI: ffffffffffffffff RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000005bd R14: 00000000006f8a58 R15: 0000000000000000 audit: type=1400 audit(1518378834.194:55): avc: denied { setuid } for pid=7180 comm="syz-executor4" capability=7 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 x_tables: ip6_tables: MASQUERADE target: used from hooks OUTPUT, but only usable from POSTROUTING x_tables: ip6_tables: MASQUERADE target: used from hooks OUTPUT, but only usable from POSTROUTING ====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #308 Tainted: G W ------------------------------------------------------ syz-executor6/7241 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000504499a1>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (&xt[i].mutex){+.+.}, at: [<0000000076cc8978>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 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:1046 xt_request_find_table_lock+0x28/0xc0 net/netfilter/x_tables.c:1093 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 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 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-executor6/7241: #0: (&xt[i].mutex){+.+.}, at: [<0000000076cc8978>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 stack backtrace: CPU: 1 PID: 7241 Comm: syz-executor6 Tainted: G W 4.15.0+ #308 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 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 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:0x453a59 RSP: 002b:00007f29f631bc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f29f631c6d4 RCX: 0000000000453a59 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000017 RBP: 000000000071bea0 R08: 0000000000000280 R09: 0000000000000000 R10: 00000000203ae000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004d5 R14: 00000000006f7498 R15: 0000000000000000 ip6_tables: error: `+:zޒfb{td' audit: type=1400 audit(1518378835.492:56): avc: denied { connect } for pid=7302 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_generic_socket permissive=1