binder: 9570:9582 IncRefs 0 refcount change on invalid ref 0 ret -22 binder: 9570:9578 Release 1 refcount change on invalid ref 0 ret -22 binder: 9570:9578 got transaction to invalid handle ====================================================== [ INFO: possible circular locking dependency detected ] 4.4.174+ #17 Not tainted ------------------------------------------------------- syz-executor.2/9582 is trying to acquire lock: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 but task is already holding lock: (sk_lock-AF_INET6){+.+.+.}, at: [] lock_sock include/net/sock.h:1497 [inline] (sk_lock-AF_INET6){+.+.+.}, at: [] do_ipv6_setsockopt.isra.0+0x28a/0x30c0 net/ipv6/ipv6_sockglue.c:166 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] lock_sock_nested+0xc6/0x120 net/core/sock.c:2463 [] lock_sock include/net/sock.h:1497 [inline] [] do_ip_setsockopt.isra.0+0x100/0x33a0 net/ipv4/ip_sockglue.c:625 [] ip_setsockopt+0x3b/0xa0 net/ipv4/ip_sockglue.c:1218 [] compat_mc_setsockopt+0x4f7/0x690 net/compat.c:630 [] compat_ip_setsockopt+0xc2/0xd0 net/ipv4/ip_sockglue.c:1241 [] compat_udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2172 [] compat_ipv6_setsockopt+0xb4/0x1d0 net/ipv6/ipv6_sockglue.c:923 [] inet_csk_compat_setsockopt+0x99/0x120 net/ipv4/inet_connection_sock.c:914 [] compat_tcp_setsockopt+0x40/0x70 net/ipv4/tcp.c:2654 [] compat_sock_common_setsockopt+0xb4/0x150 net/core/sock.c:2674 [] C_SYSC_setsockopt net/compat.c:385 [inline] [] compat_SyS_setsockopt+0x15c/0x720 net/compat.c:368 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 [] ipv6_sock_mc_close+0x10e/0x350 net/ipv6/mcast.c:288 [] do_ipv6_setsockopt.isra.0+0x1bd1/0x30c0 net/ipv6/ipv6_sockglue.c:202 [] compat_ipv6_setsockopt net/ipv6/ipv6_sockglue.c:935 [inline] [] compat_ipv6_setsockopt+0xe7/0x1d0 net/ipv6/ipv6_sockglue.c:916 [] compat_udpv6_setsockopt+0x4e/0x90 net/ipv6/udp.c:1446 [] compat_sock_common_setsockopt+0xb4/0x150 net/core/sock.c:2674 [] C_SYSC_setsockopt net/compat.c:385 [inline] [] compat_SyS_setsockopt+0x15c/0x720 net/compat.c:368 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET6); lock(rtnl_mutex); lock(sk_lock-AF_INET6); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor.2/9582: #0: (sk_lock-AF_INET6){+.+.+.}, at: [] lock_sock include/net/sock.h:1497 [inline] #0: (sk_lock-AF_INET6){+.+.+.}, at: [] do_ipv6_setsockopt.isra.0+0x28a/0x30c0 net/ipv6/ipv6_sockglue.c:166 stack backtrace: CPU: 0 PID: 9582 Comm: syz-executor.2 Not tainted 4.4.174+ #17 0000000000000000 f7eb707fd5322327 ffff8801b0e3f540 ffffffff81aad1a1 ffffffff84057a80 ffff8801bd648000 ffffffff83a8db50 ffffffff83acc400 ffffffff83a8db50 ffff8801b0e3f590 ffffffff813abcda ffff8801b0e3f670 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [] print_circular_bug.cold+0x2f7/0x44e kernel/locking/lockdep.c:1226 [] check_prev_add kernel/locking/lockdep.c:1853 [inline] [] check_prevs_add kernel/locking/lockdep.c:1958 [inline] [] validate_chain kernel/locking/lockdep.c:2144 [inline] [] __lock_acquire+0x37d6/0x4f50 kernel/locking/lockdep.c:3213 [] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592 [] __mutex_lock_common kernel/locking/mutex.c:521 [inline] [] mutex_lock_nested+0xc1/0xb80 kernel/locking/mutex.c:621 [] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:70 [] ipv6_sock_mc_close+0x10e/0x350 net/ipv6/mcast.c:288 [] do_ipv6_setsockopt.isra.0+0x1bd1/0x30c0 net/ipv6/ipv6_sockglue.c:202 [] compat_ipv6_setsockopt net/ipv6/ipv6_sockglue.c:935 [inline] [] compat_ipv6_setsockopt+0xe7/0x1d0 net/ipv6/ipv6_sockglue.c:916 [] compat_udpv6_setsockopt+0x4e/0x90 net/ipv6/udp.c:1446 [] compat_sock_common_setsockopt+0xb4/0x150 net/core/sock.c:2674 [] C_SYSC_setsockopt net/compat.c:385 [inline] [] compat_SyS_setsockopt+0x15c/0x720 net/compat.c:368 [] do_syscall_32_irqs_on arch/x86/entry/common.c:330 [inline] [] do_fast_syscall_32+0x32d/0xa90 arch/x86/entry/common.c:397 [] sysenter_flags_fixed+0xd/0x1a binder: 9570:9578 transaction failed 29201/-22, size 72-24 line 3014 audit: type=1400 audit(1564356364.127:462): avc: denied { create } for pid=9565 comm="syz-executor.3" 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=0 audit: type=1400 audit(1564356364.397:463): avc: denied { create } for pid=9595 comm="syz-executor.4" 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=0 binder: 9625:9630 ioctl 40047451 20000080 returned -22 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket binder: 9625:9630 ioctl 8919 20000000 returned -22 binder: 9625:9630 ioctl 40047451 20000080 returned -22 binder: 9625:9637 ioctl 8919 20000000 returned -22 audit: type=1400 audit(1564356364.797:464): avc: denied { relabelto } for pid=9641 comm="syz-executor.2" name="KEY" dev="sockfs" ino=31950 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:getty_var_run_t:s0 tclass=key_socket permissive=0 audit: type=1400 audit(1564356364.917:465): avc: denied { relabelto } for pid=9641 comm="syz-executor.2" name="KEY" dev="sockfs" ino=31691 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:getty_var_run_t:s0 tclass=key_socket permissive=0 binder: 9652:9656 ioctl 40047451 20000080 returned -22 binder: 9652:9656 ioctl 8919 20000000 returned -22 Ø: renamed from eql binder: 9672:9673 ioctl 40047451 20000080 returned -22 binder: 9672:9673 ioctl 8919 20000000 returned -22 binder: 9684:9686 ioctl 40047451 20000080 returned -22 binder: 9684:9686 ioctl 8919 20000000 returned -22 audit: type=1400 audit(1564356365.287:466): avc: denied { create } for pid=9665 comm="syz-executor.4" 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=0 binder: 9710:9711 ioctl 40047451 20000080 returned -22 binder: 9710:9711 ioctl 8919 20000000 returned -22 audit: type=1400 audit(1564356365.887:467): avc: denied { create } for pid=9713 comm="syz-executor.1" 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=0 binder: 9730:9732 ioctl 40047451 20000080 returned -22 audit_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1564356367.747:472): avc: denied { create } for pid=9795 comm="syz-executor.5" 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=0 audit: type=1400 audit(1564356367.917:473): avc: denied { create } for pid=9815 comm="syz-executor.4" 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=0 audit: type=1400 audit(1564356368.687:474): avc: denied { create } for pid=9848 comm="syz-executor.5" 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=0 audit: type=1400 audit(1564356368.807:475): avc: denied { create } for pid=9863 comm="syz-executor.4" 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=0 audit: type=1400 audit(1564356369.507:476): avc: denied { create } for pid=9905 comm="syz-executor.5" 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=0 audit: type=1400 audit(1564356369.697:477): avc: denied { create } for pid=9925 comm="syz-executor.4" 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=0 audit: type=1400 audit(1564356370.397:478): avc: denied { create } for pid=9972 comm="syz-executor.5" 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=0 audit: type=1400 audit(1564356370.737:479): avc: denied { create } for pid=9998 comm="syz-executor.3" 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=0 audit: type=1400 audit(1564356371.267:480): avc: denied { create } for pid=10039 comm="syz-executor.5" 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=0 audit: type=1400 audit(1564356371.567:481): avc: denied { create } for pid=10052 comm="syz-executor.3" 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=0 audit_printk_skb: 9 callbacks suppressed audit: type=1400 audit(1564356372.997:485): avc: denied { create } for pid=10144 comm="syz-executor.5" 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=0 audit: type=1400 audit(1564356373.177:486): avc: denied { create } for pid=10139 comm="syz-executor.2" 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=0