Warning: Permanently added '10.128.15.207' (ECDSA) to the list of known hosts. [ 29.607242] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 29.719620] audit: type=1400 audit(1536357642.595:7): avc: denied { map } for pid=4356 comm="syz-executor459" path="/root/syz-executor459339248" dev="sda1" ino=16481 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 [ 29.726012] [ 29.745971] audit: type=1400 audit(1536357642.599:8): avc: denied { map } for pid=4356 comm="syz-executor459" path="/dev/ashmem" dev="devtmpfs" ino=1306 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 [ 29.747505] ====================================================== [ 29.747509] WARNING: possible circular locking dependency detected [ 29.747516] 4.19.0-rc2+ #5 Not tainted [ 29.747519] ------------------------------------------------------ [ 29.747525] syz-executor459/4356 is trying to acquire lock: [ 29.747531] 00000000115cc21d (&sb->s_type->i_mutex_key#10){++++}, at: shmem_fallocate+0x18b/0x12e0 [ 29.810642] [ 29.810642] but task is already holding lock: [ 29.816702] 00000000aacbbe76 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 29.824899] [ 29.824899] which lock already depends on the new lock. [ 29.824899] [ 29.833218] [ 29.833218] the existing dependency chain (in reverse order) is: [ 29.840972] [ 29.840972] -> #2 (ashmem_mutex){+.+.}: [ 29.846527] __mutex_lock+0x171/0x1700 [ 29.851069] mutex_lock_nested+0x16/0x20 [ 29.855660] ashmem_mmap+0x55/0x520 [ 29.859866] mmap_region+0xf27/0x1c50 [ 29.864199] do_mmap+0xa10/0x1220 [ 29.868195] vm_mmap_pgoff+0x213/0x2c0 [ 29.872599] ksys_mmap_pgoff+0x4da/0x660 [ 29.877259] __x64_sys_mmap+0xe9/0x1b0 [ 29.881662] do_syscall_64+0x1b9/0x820 [ 29.886077] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.891897] [ 29.891897] -> #1 (&mm->mmap_sem){++++}: [ 29.897450] __might_fault+0x155/0x1e0 [ 29.901859] _copy_to_user+0x30/0x110 [ 29.906197] filldir+0x1ea/0x3a0 [ 29.910085] dcache_readdir+0x13a/0x620 [ 29.914588] iterate_dir+0x48b/0x5d0 [ 29.918868] __x64_sys_getdents+0x29f/0x510 [ 29.923706] do_syscall_64+0x1b9/0x820 [ 29.928116] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.933816] [ 29.933816] -> #0 (&sb->s_type->i_mutex_key#10){++++}: [ 29.940579] lock_acquire+0x1e4/0x4f0 [ 29.944897] down_write+0x8f/0x130 [ 29.949117] shmem_fallocate+0x18b/0x12e0 [ 29.953811] ashmem_shrink_scan+0x236/0x630 [ 29.958654] ashmem_ioctl+0x3ae/0x13a0 [ 29.963066] do_vfs_ioctl+0x1de/0x1720 [ 29.967633] ksys_ioctl+0xa9/0xd0 [ 29.971603] __x64_sys_ioctl+0x73/0xb0 [ 29.976122] do_syscall_64+0x1b9/0x820 [ 29.980597] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.986346] [ 29.986346] other info that might help us debug this: [ 29.986346] [ 29.994483] Chain exists of: [ 29.994483] &sb->s_type->i_mutex_key#10 --> &mm->mmap_sem --> ashmem_mutex [ 29.994483] [ 30.006096] Possible unsafe locking scenario: [ 30.006096] [ 30.012194] CPU0 CPU1 [ 30.016855] ---- ---- [ 30.021515] lock(ashmem_mutex); [ 30.024962] lock(&mm->mmap_sem); [ 30.031012] lock(ashmem_mutex); [ 30.036981] lock(&sb->s_type->i_mutex_key#10); [ 30.041732] [ 30.041732] *** DEADLOCK *** [ 30.041732] [ 30.047789] 1 lock held by syz-executor459/4356: [ 30.052533] #0: 00000000aacbbe76 (ashmem_mutex){+.+.}, at: ashmem_shrink_scan+0xb4/0x630 [ 30.060867] [ 30.060867] stack backtrace: [ 30.065430] CPU: 1 PID: 4356 Comm: syz-executor459 Not tainted 4.19.0-rc2+ #5 [ 30.072699] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 30.082054] Call Trace: [ 30.084711] dump_stack+0x1c9/0x2b4 [ 30.088406] ? dump_stack_print_info.cold.2+0x52/0x52 [ 30.093609] ? vprintk_func+0x81/0x117 [ 30.097493] print_circular_bug.isra.34.cold.55+0x1bd/0x27d [ 30.103371] ? save_trace+0xe0/0x290 [ 30.107092] __lock_acquire+0x3449/0x5020 [ 30.111245] ? lock_pin_lock+0x350/0x350 [ 30.115304] ? mark_held_locks+0x160/0x160 [ 30.119534] ? print_usage_bug+0xc0/0xc0 [ 30.123589] ? mark_held_locks+0x160/0x160 [ 30.127816] ? __bfs+0x390/0x7b0 [ 30.131195] ? __lock_acquire+0x7fc/0x5020 [ 30.135427] ? print_usage_bug+0xc0/0xc0 [ 30.139536] ? mark_held_locks+0x160/0x160 [ 30.143764] ? print_usage_bug+0xc0/0xc0 [ 30.147820] ? trace_hardirqs_off_caller+0x2b0/0x2b0 [ 30.152918] ? graph_lock+0x170/0x170 [ 30.156936] ? graph_lock+0x170/0x170 [ 30.160802] lock_acquire+0x1e4/0x4f0 [ 30.164649] ? shmem_fallocate+0x18b/0x12e0 [ 30.168967] ? lock_release+0x9f0/0x9f0 [ 30.172967] ? check_same_owner+0x340/0x340 [ 30.177331] ? mark_held_locks+0x160/0x160 [ 30.181704] ? rcu_note_context_switch+0x680/0x680 [ 30.186633] ? graph_lock+0x170/0x170 [ 30.190679] down_write+0x8f/0x130 [ 30.194218] ? shmem_fallocate+0x18b/0x12e0 [ 30.198536] ? down_read+0x1d0/0x1d0 [ 30.202290] ? find_held_lock+0x36/0x1c0 [ 30.206349] shmem_fallocate+0x18b/0x12e0 [ 30.210493] ? lock_downgrade+0x8f0/0x8f0 [ 30.214636] ? kasan_check_read+0x11/0x20 [ 30.218826] ? shmem_setattr+0xda0/0xda0 [ 30.222939] ? rcu_cleanup_dead_rnp+0x200/0x200 [ 30.227630] ? entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.232991] ? avc_has_perm_noaudit+0x458/0x640 [ 30.237654] ? lock_acquire+0x1e4/0x4f0 [ 30.241624] ? ashmem_shrink_scan+0xb4/0x630 [ 30.246025] ? lock_release+0x9f0/0x9f0 [ 30.250003] ? kasan_check_read+0x11/0x20 [ 30.254145] ? rcu_is_watching+0x8c/0x150 [ 30.258315] ? mutex_trylock+0x24c/0x2b0 [ 30.262434] ? ashmem_shrink_scan+0xb4/0x630 [ 30.266842] ? __mutex_add_waiter+0x2a0/0x2a0 [ 30.271333] ? __mutex_unlock_slowpath+0x7/0x8c0 [ 30.276216] ashmem_shrink_scan+0x236/0x630 [ 30.280682] ? ashmem_release+0x190/0x190 [ 30.284831] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.290363] ? ns_capable_common+0x13f/0x170 [ 30.294770] ashmem_ioctl+0x3ae/0x13a0 [ 30.298658] ? ashmem_shrink_scan+0x630/0x630 [ 30.303239] ? check_same_owner+0x340/0x340 [ 30.307678] ? ashmem_shrink_scan+0x630/0x630 [ 30.312191] do_vfs_ioctl+0x1de/0x1720 [ 30.316087] ? ioctl_preallocate+0x300/0x300 [ 30.320611] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.326172] ? selinux_capable+0x40/0x40 [ 30.330233] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.335809] ? __do_page_fault+0x449/0xe50 [ 30.340041] ? do_syscall_64+0x9a/0x820 [ 30.344038] ? __sanitizer_cov_trace_const_cmp4+0x16/0x20 [ 30.349583] ? security_file_ioctl+0x94/0xc0 [ 30.354035] ksys_ioctl+0xa9/0xd0 [ 30.357548] __x64_sys_ioctl+0x73/0xb0 [ 30.361435] do_syscall_64+0x1b9/0x820 [ 30.365322] ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe [ 30.370730] ? syscall_return_slowpath+0x5e0/0x5e0 [ 30.375748] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.380635] ? trace_hardirqs_on_caller+0x2c0/0x2c0 [ 30.385647] ? prepare_exit_to_usermode+0x3b0/0x3b0 [ 30.390747] ? prepare_exit_to_usermode+0x291/0x3b0 [ 30.395806] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 30.400644] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 30.405876] RIP: 0033:0x440089 [ 30.409076] Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01