xt_HMARK: hash modulus can't be zero ============================= xt_HMARK: hash modulus can't be zero WARNING: suspicious RCU usage 4.15.0-rc9+ #284 Not tainted ----------------------------- net/tipc/bearer.c:177 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by syz-executor6/13256: #0: (cb_lock){++++}, at: [<00000000e3a0765b>] genl_rcv+0x19/0x40 net/netlink/genetlink.c:634 #1: (genl_mutex){+.+.}, at: [<00000000cc4d724f>] genl_lock net/netlink/genetlink.c:33 [inline] #1: (genl_mutex){+.+.}, at: [<00000000cc4d724f>] genl_rcv_msg+0x115/0x140 net/netlink/genetlink.c:622 stack backtrace: CPU: 0 PID: 13256 Comm: syz-executor6 Not tainted 4.15.0-rc9+ #284 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:4587 tipc_bearer_find+0x2b4/0x3b0 net/tipc/bearer.c:177 tipc_nl_compat_link_set+0x329/0x9f0 net/tipc/netlink_compat.c:729 __tipc_nl_compat_doit net/tipc/netlink_compat.c:288 [inline] tipc_nl_compat_doit+0x15b/0x670 net/tipc/netlink_compat.c:335 tipc_nl_compat_handle net/tipc/netlink_compat.c:1119 [inline] tipc_nl_compat_recv+0x1135/0x18f0 net/tipc/netlink_compat.c:1201 genl_family_rcv_msg+0x7b7/0xfb0 net/netlink/genetlink.c:599 genl_rcv_msg+0xb2/0x140 net/netlink/genetlink.c:624 netlink_rcv_skb+0x14b/0x380 net/netlink/af_netlink.c:2409 genl_rcv+0x28/0x40 net/netlink/genetlink.c:635 netlink_unicast_kernel net/netlink/af_netlink.c:1275 [inline] netlink_unicast+0x4ee/0x700 net/netlink/af_netlink.c:1301 netlink_sendmsg+0xa4a/0xe60 net/netlink/af_netlink.c:1864 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg+0xca/0x110 net/socket.c:648 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2028 __sys_sendmsg+0xe5/0x210 net/socket.c:2062 SYSC_sendmsg net/socket.c:2073 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2069 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f41b2db8c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020003000 RDI: 0000000000000013 RBP: 00000000000005c4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f7b00 R13: 00000000ffffffff R14: 00007f41b2db96d4 R15: 0000000000000000 kauditd_printk_skb: 89 callbacks suppressed audit: type=1400 audit(1517210274.584:1105): avc: denied { net_raw } for pid=13616 comm="syz-executor6" 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 sock: sock_set_timeout: `syz-executor7' (pid 13633) tries to set negative timeout audit: type=1400 audit(1517210274.632:1106): avc: denied { sys_admin } for pid=13624 comm="syz-executor4" 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 sock: sock_set_timeout: `syz-executor7' (pid 13633) tries to set negative timeout audit: type=1400 audit(1517210274.818:1107): avc: denied { name_bind } for pid=13665 comm="syz-executor0" src=20001 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517210274.819:1108): avc: denied { node_bind } for pid=13665 comm="syz-executor0" saddr=fe80::bb src=20001 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517210274.877:1109): avc: denied { name_connect } for pid=13665 comm="syz-executor0" dest=20000 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517210275.029:1110): avc: denied { setopt } for pid=13713 comm="syz-executor3" 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(1517210275.106:1111): avc: denied { map } for pid=13726 comm="syz-executor6" path="/dev/binder0" dev="devtmpfs" ino=9046 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: 13726:13734 got transaction to invalid handle binder: 13726:13734 transaction failed 29201/-22, size 0-0 line 2788 binder_alloc: binder_alloc_mmap_handler: 13726 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 13726:13745 ioctl 40046207 0 returned -16 binder: 13726:13734 got transaction to invalid handle binder: 13726:13734 transaction failed 29201/-22, size 0-0 line 2788 binder: undelivered TRANSACTION_ERROR: 29201 audit: type=1400 audit(1517210275.137:1112): avc: denied { setgid } for pid=13724 comm="syz-executor5" 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 audit: type=1400 audit(1517210275.151:1113): avc: denied { set_context_mgr } for pid=13726 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 audit: type=1400 audit(1517210275.154:1114): avc: denied { create } for pid=13726 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=netlink_crypto_socket permissive=1 RDS: rds_bind could not find a transport for 172.20.0.170, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 172.20.0.170, load rds_tcp or rds_rdma? netlink: 'syz-executor7': attribute type 16 has an invalid length. IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready netlink: 'syz-executor7': attribute type 16 has an invalid length. cgroup: cgroup2: unknown option "" cgroup: cgroup2: unknown option "" sctp: [Deprecated]: syz-executor5 (pid 13975) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor5 (pid 13983) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead bridge: RTM_NEWNEIGH with invalid state 0x0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=14040 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=14040 comm=syz-executor7 xt_cgroup: invalid path, errno=-2 IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready devpts: called with bogus options devpts: called with bogus options could not allocate digest TFM handle binder: 14455:14457 BC_CLEAR_DEATH_NOTIFICATION death notification cookie mismatch 0000000000000000 != 0000000000000003 binder: 14455:14457 ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER binder: 14457 RLIMIT_NICE not set binder: 14455:14457 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 14455:14457 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: 14455:14459 ERROR: BC_REGISTER_LOOPER called without request binder: 14455:14459 IncRefs 0 refcount change on invalid ref 0 ret -22 binder: 14459 RLIMIT_NICE not set QAT: Invalid ioctl QAT: Invalid ioctl FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 14639 Comm: syz-executor1 Not tainted 4.15.0-rc9+ #284 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:421 [inline] slab_alloc_node mm/slab.c:3289 [inline] kmem_cache_alloc_node+0x56/0x760 mm/slab.c:3632 __alloc_skb+0xf1/0x780 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:983 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1147 [inline] netlink_sendmsg+0xa86/0xe60 net/netlink/af_netlink.c:1839 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg+0xca/0x110 net/socket.c:648 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2028 __sys_sendmsg+0xe5/0x210 net/socket.c:2062 SYSC_sendmsg net/socket.c:2073 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2069 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f1bf9c05c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1bf9c05aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 000000002000cfc8 RDI: 0000000000000014 RBP: 00007f1bf9c05a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007f1bf9c05bc8 R14: 00000000004b8096 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 14654 Comm: syz-executor1 Not tainted 4.15.0-rc9+ #284 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:421 [inline] slab_alloc_node mm/slab.c:3289 [inline] kmem_cache_alloc_node_trace+0x5a/0x750 mm/slab.c:3651 __do_kmalloc_node mm/slab.c:3671 [inline] __kmalloc_node_track_caller+0x33/0x70 mm/slab.c:3686 __kmalloc_reserve.isra.39+0x41/0xd0 net/core/skbuff.c:137 __alloc_skb+0x13b/0x780 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:983 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1147 [inline] netlink_sendmsg+0xa86/0xe60 net/netlink/af_netlink.c:1839 sock_sendmsg_nosec net/socket.c:638 [inline] sock_sendmsg+0xca/0x110 net/socket.c:648 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2028 __sys_sendmsg+0xe5/0x210 net/socket.c:2062 SYSC_sendmsg net/socket.c:2073 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2069 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f1bf9c05c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f1bf9c05aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 000000002000cfc8 RDI: 0000000000000014 RBP: 00007f1bf9c05a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007f1bf9c05bc8 R14: 00000000004b8096 R15: 0000000000000000 kauditd_printk_skb: 41 callbacks suppressed audit: type=1400 audit(1517210280.022:1156): avc: denied { ipc_owner } for pid=14672 comm="syz-executor2" 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 ====================================================== WARNING: possible circular locking dependency detected 4.15.0-rc9+ #284 Not tainted ------------------------------------------------------ syz-executor5/14711 is trying to acquire lock: (&sb->s_type->i_mutex_key#11){++++}, at: [<00000000c75026a4>] inode_lock include/linux/fs.h:713 [inline] (&sb->s_type->i_mutex_key#11){++++}, at: [<00000000c75026a4>] shmem_file_llseek+0xef/0x240 mm/shmem.c:2579 but task is already holding lock: (ashmem_mutex){+.+.}, at: [<00000000239c8447>] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:334 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (ashmem_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 ashmem_mmap+0x53/0x410 drivers/staging/android/ashmem.c:370 call_mmap include/linux/fs.h:1777 [inline] mmap_region+0xa99/0x15a0 mm/mmap.c:1705 do_mmap+0x6c0/0xe00 mm/mmap.c:1483 do_mmap_pgoff include/linux/mm.h:2217 [inline] vm_mmap_pgoff+0x1de/0x280 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1533 [inline] SyS_mmap_pgoff+0x462/0x5f0 mm/mmap.c:1491 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #1 (&mm->mmap_sem){++++}: __might_fault+0x13a/0x1d0 mm/memory.c:4535 _copy_to_user+0x2c/0xc0 lib/usercopy.c:25 copy_to_user include/linux/uaccess.h:155 [inline] filldir+0x1a7/0x320 fs/readdir.c:196 dir_emit_dot include/linux/fs.h:3374 [inline] dir_emit_dots include/linux/fs.h:3385 [inline] dcache_readdir+0x12d/0x5e0 fs/libfs.c:192 iterate_dir+0x1ca/0x530 fs/readdir.c:51 SYSC_getdents fs/readdir.c:231 [inline] SyS_getdents+0x225/0x450 fs/readdir.c:212 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (&sb->s_type->i_mutex_key#11){++++}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3915 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] shmem_file_llseek+0xef/0x240 mm/shmem.c:2579 vfs_llseek+0xa2/0xd0 fs/read_write.c:300 ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:346 vfs_llseek fs/read_write.c:300 [inline] SYSC_lseek fs/read_write.c:313 [inline] SyS_lseek+0xeb/0x170 fs/read_write.c:304 entry_SYSCALL_64_fastpath+0x29/0xa0 other info that might help us debug this: Chain exists of: &sb->s_type->i_mutex_key#11 --> &mm->mmap_sem --> ashmem_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&sb->s_type->i_mutex_key#11); *** DEADLOCK *** 1 lock held by syz-executor5/14711: #0: (ashmem_mutex){+.+.}, at: [<00000000239c8447>] ashmem_llseek+0x56/0x1f0 drivers/staging/android/ashmem.c:334 stack backtrace: CPU: 0 PID: 14711 Comm: syz-executor5 Not tainted 4.15.0-rc9+ #284 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 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] shmem_file_llseek+0xef/0x240 mm/shmem.c:2579 vfs_llseek+0xa2/0xd0 fs/read_write.c:300 ashmem_llseek+0xe7/0x1f0 drivers/staging/android/ashmem.c:346 vfs_llseek fs/read_write.c:300 [inline] SYSC_lseek fs/read_write.c:313 [inline] SyS_lseek+0xeb/0x170 fs/read_write.c:304 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fcff03ffc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000008 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000004 RSI: fffffffffffffff9 RDI: 0000000000000013 RBP: 00000000000003d6 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f4cb0 R13: 00000000ffffffff R14: 00007fcff04006d4 R15: 0000000000000000 audit: type=1400 audit(1517210280.722:1157): avc: denied { ioctl } for pid=14752 comm="syz-executor1" path="socket:[35153]" dev="sockfs" ino=35153 ioctlcmd=0x8940 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 xt_SECMARK: mode already set to 1 cannot mix with rules for mode 0 xt_SECMARK: mode already set to 1 cannot mix with rules for mode 0 audit: type=1400 audit(1517210280.985:1158): avc: denied { read } for pid=14839 comm="syz-executor6" path="socket:[35901]" dev="sockfs" ino=35901 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 binder: 14835:14845 ERROR: BC_REGISTER_LOOPER called without request binder_alloc: binder_alloc_mmap_handler: 14835 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 14835:14845 ioctl 40046207 0 returned -16 binder: 14835:14850 ERROR: BC_REGISTER_LOOPER called without request binder_alloc: 14835: binder_alloc_buf, no vma binder: 14835:14850 transaction failed 29189/-3, size 0-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 14835:14845 transaction 64 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 64, target dead audit: type=1400 audit(1517210280.994:1159): avc: denied { call } for pid=14835 comm="syz-executor2" 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-executor4': attribute type 3 has an invalid length. netlink: 'syz-executor4': attribute type 3 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl insert transport fail, errno -17 audit: type=1400 audit(1517210282.515:1160): avc: denied { prog_run } for pid=15257 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 device eql entered promiscuous mode