netlink: 20 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor5'. ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc2+ #328 Not tainted ------------------------------------------------------ syz-executor1/19131 is trying to acquire lock: (&mm->mmap_sem){++++}, at: [<00000000dca394a0>] __might_fault+0xe0/0x1d0 mm/memory.c:4570 but task is already holding lock: (ashmem_mutex){+.+.}, at: [<00000000244014f9>] ashmem_pin_unpin drivers/staging/android/ashmem.c:705 [inline] (ashmem_mutex){+.+.}, at: [<00000000244014f9>] ashmem_ioctl+0x3db/0x11b0 drivers/staging/android/ashmem.c:782 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (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:362 call_mmap include/linux/fs.h:1786 [inline] mmap_region+0xa99/0x15a0 mm/mmap.c:1705 do_mmap+0x6c0/0xe00 mm/mmap.c:1483 do_mmap_pgoff include/linux/mm.h:2223 [inline] vm_mmap_pgoff+0x1de/0x280 mm/util.c:355 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 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (&mm->mmap_sem){++++}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __might_fault+0x13a/0x1d0 mm/memory.c:4571 _copy_from_user+0x2c/0x110 lib/usercopy.c:10 copy_from_user include/linux/uaccess.h:147 [inline] ashmem_pin_unpin drivers/staging/android/ashmem.c:710 [inline] ashmem_ioctl+0x438/0x11b0 drivers/staging/android/ashmem.c:782 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(ashmem_mutex); lock(&mm->mmap_sem); lock(ashmem_mutex); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by syz-executor1/19131: #0: (ashmem_mutex){+.+.}, at: [<00000000244014f9>] ashmem_pin_unpin drivers/staging/android/ashmem.c:705 [inline] #0: (ashmem_mutex){+.+.}, at: [<00000000244014f9>] ashmem_ioctl+0x3db/0x11b0 drivers/staging/android/ashmem.c:782 stack backtrace: CPU: 1 PID: 19131 Comm: syz-executor1 Not tainted 4.16.0-rc2+ #328 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/0x24d 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 __might_fault+0x13a/0x1d0 mm/memory.c:4571 _copy_from_user+0x2c/0x110 lib/usercopy.c:10 copy_from_user include/linux/uaccess.h:147 [inline] ashmem_pin_unpin drivers/staging/android/ashmem.c:710 [inline] ashmem_ioctl+0x438/0x11b0 drivers/staging/android/ashmem.c:782 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453de9 RSP: 002b:00007f0686d4ac68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f0686d4b6d4 RCX: 0000000000453de9 RDX: 0000000000000000 RSI: 0000000000007709 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000017a R14: 00000000006f2410 R15: 0000000000000000 audit: type=1400 audit(1519566725.377:114): avc: denied { getopt } for pid=19205 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_crypto_socket permissive=1 audit: type=1400 audit(1519566725.378:115): avc: denied { setopt } for pid=19205 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_crypto_socket permissive=1 tmpfs: No value for mount option 'I4MÓ' tmpfs: No value for mount option 'I4MÓ' binder: 19368 RLIMIT_NICE not set binder: BINDER_SET_CONTEXT_MGR already set binder: 19362:19368 ioctl 40046207 0 returned -16 binder: 19377 RLIMIT_NICE not set x_tables: ip6_tables: mh match: only valid for protocol 135 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl rfkill: input handler disabled rfkill: input handler enabled rfkill: input handler disabled rfkill: input handler enabled netlink: 'syz-executor2': attribute type 1 has an invalid length. x_tables: ip_tables: ah match: only valid for protocol 51 netlink: 'syz-executor2': attribute type 1 has an invalid length. PPPIOCDETACH file->f_count=2 netlink: 'syz-executor2': attribute type 1 has an invalid length. x_tables: ip_tables: ah match: only valid for protocol 51 PPPIOCDETACH file->f_count=3 audit: type=1400 audit(1519566727.797:116): avc: denied { create } for pid=19847 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_connector_socket permissive=1 audit: type=1400 audit(1519566727.824:117): avc: denied { write } for pid=19847 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_connector_socket permissive=1 audit: type=1400 audit(1519566727.825:118): avc: denied { read } for pid=19847 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_connector_socket permissive=1 audit: type=1400 audit(1519566728.577:119): avc: denied { setfcap } for pid=20101 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 do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app rfkill: input handler disabled rfkill: input handler enabled netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 20630 Comm: syz-executor5 Not tainted 4.16.0-rc2+ #328 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/0x24d 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_trace+0x4b/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] region_chg+0x429/0xa80 mm/hugetlb.c:401 __vma_reservation_common+0x100/0x2d0 mm/hugetlb.c:1883 vma_needs_reservation mm/hugetlb.c:1932 [inline] alloc_huge_page+0x1cd/0x1150 mm/hugetlb.c:2014 hugetlbfs_fallocate+0x79f/0x1220 fs/hugetlbfs/inode.c:627 vfs_fallocate+0x33c/0x6f0 fs/open.c:319 SYSC_fallocate fs/open.c:342 [inline] SyS_fallocate+0x53/0x90 fs/open.c:336 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453de9 RSP: 002b:00007fd6dd3c9c68 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007fd6dd3ca6d4 RCX: 0000000000453de9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000015 R13: 000000000000007d R14: 00000000006f0c58 R15: 0000000000000000 QAT: Invalid ioctl QAT: Invalid ioctl binder: 21027:21036 ioctl c0306201 200002c0 returned -14 binder: 21027:21036 ioctl c0306201 200002c0 returned -14 audit: type=1400 audit(1519566733.171:120): avc: denied { map } for pid=21410 comm="syz-executor4" path="pipe:[63927]" dev="pipefs" ino=63927 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(1519566733.222:121): avc: denied { execute } for pid=21410 comm="syz-executor4" path="pipe:[63927]" dev="pipefs" ino=63927 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 binder: 21492:21495 got new transaction with bad transaction stack, transaction 60 has target 21492:0 binder: 21492:21495 transaction failed 29201/-71, size 0-0 line 2875 binder_alloc: binder_alloc_mmap_handler: 21492 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 21492: binder_alloc_buf, no vma binder: 21492:21495 ioctl 40046207 0 returned -16 binder: 21492:21503 transaction failed 29189/-3, size 0-0 line 2963 binder_alloc: 21492: binder_alloc_buf, no vma binder: 21492:21495 transaction failed 29189/-3, size 0-0 line 2963 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 21492:21495 transaction 60 out, still active binder: send failed reply for transaction 60, target dead audit: type=1400 audit(1519566733.521:122): avc: denied { create } for pid=21519 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_rdma_socket permissive=1 audit: type=1400 audit(1519566733.522:123): avc: denied { write } for pid=21519 comm="syz-executor0" path="socket:[63311]" dev="sockfs" ino=63311 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_rdma_socket permissive=1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=28793 sclass=netlink_route_socket pig=21666 comm=syz-executor3 device eql entered promiscuous mode audit: type=1400 audit(1519566734.579:124): avc: denied { write } for pid=21860 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