====================================================== netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. WARNING: possible circular locking dependency detected 4.15.0-rc2+ #214 Not tainted ------------------------------------------------------ syz-executor1/9185 is trying to acquire lock: (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000634f3da2>] get_online_cpus include/linux/cpu.h:117 [inline] (cpu_hotplug_lock.rw_sem){++++}, at: [<00000000634f3da2>] lru_add_drain_all+0xe/0x20 mm/swap.c:729 but task is already holding lock: (&sb->s_type->i_mutex_key#10){++++}, at: [<0000000083ff7392>] inode_lock include/linux/fs.h:713 [inline] (&sb->s_type->i_mutex_key#10){++++}, at: [<0000000083ff7392>] shmem_add_seals+0x197/0x1060 mm/shmem.c:2768 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (&sb->s_type->i_mutex_key#10){++++}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 down_write+0x87/0x120 kernel/locking/rwsem.c:70 inode_lock include/linux/fs.h:713 [inline] generic_file_write_iter+0xdc/0x7a0 mm/filemap.c:3289 call_write_iter include/linux/fs.h:1772 [inline] do_iter_readv_writev+0x531/0x7f0 fs/read_write.c:653 do_iter_write+0x15a/0x540 fs/read_write.c:932 vfs_iter_write+0x77/0xb0 fs/read_write.c:945 iter_file_splice_write+0x7db/0xf30 fs/splice.c:749 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x7d5/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 -> #5 (&pipe->mutex/1){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 __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 pipe_lock_nested fs/pipe.c:67 [inline] pipe_lock+0x56/0x70 fs/pipe.c:75 iter_file_splice_write+0x264/0xf30 fs/splice.c:699 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x7d5/0x1630 fs/splice.c:1382 entry_SYSCALL_64_fastpath+0x1f/0x96 -> #4 (sb_writers){.+.+}: spin_lock include/linux/spinlock.h:315 [inline] evict+0x533/0x920 fs/inode.c:565 iput_final fs/inode.c:1515 [inline] iput+0x7b9/0xaf0 fs/inode.c:1542 dentry_unlink_inode+0x4b0/0x5e0 fs/dcache.c:375 d_delete+0x1a7/0x250 fs/dcache.c:2367 vfs_unlink+0x36e/0x480 fs/namei.c:3991 -> #3 ((completion)&req.done){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 complete_acquire include/linux/completion.h:40 [inline] __wait_for_common kernel/sched/completion.c:109 [inline] wait_for_common kernel/sched/completion.c:123 [inline] wait_for_completion+0xcb/0x7b0 kernel/sched/completion.c:144 devtmpfs_create_node+0x32b/0x4a0 drivers/base/devtmpfs.c:115 device_add+0x120f/0x1640 drivers/base/core.c:1824 device_create_groups_vargs+0x1f3/0x250 drivers/base/core.c:2430 device_create_vargs drivers/base/core.c:2470 [inline] device_create+0xda/0x110 drivers/base/core.c:2506 msr_device_create+0x26/0x40 arch/x86/kernel/msr.c:188 cpuhp_invoke_callback+0x2ea/0x1d20 kernel/cpu.c:182 cpuhp_thread_fun+0x48e/0x7e0 kernel/cpu.c:571 smpboot_thread_fn+0x450/0x7c0 kernel/smpboot.c:164 kthread+0x37a/0x440 kernel/kthread.c:238 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:441 -> #2 (cpuhp_state-up){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 cpuhp_lock_acquire kernel/cpu.c:85 [inline] cpuhp_invoke_ap_callback kernel/cpu.c:605 [inline] cpuhp_issue_call+0x1e5/0x520 kernel/cpu.c:1495 __cpuhp_setup_state_cpuslocked+0x282/0x600 kernel/cpu.c:1642 __cpuhp_setup_state+0xb0/0x140 kernel/cpu.c:1671 cpuhp_setup_state include/linux/cpuhotplug.h:201 [inline] page_writeback_init+0x4d/0x71 mm/page-writeback.c:2081 pagecache_init+0x48/0x4f mm/filemap.c:977 start_kernel+0x6bc/0x74f init/main.c:690 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378 x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:237 -> #1 (cpuhp_state_mutex){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 __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 __cpuhp_setup_state_cpuslocked+0x5b/0x600 kernel/cpu.c:1617 __cpuhp_setup_state+0xb0/0x140 kernel/cpu.c:1671 cpuhp_setup_state_nocalls include/linux/cpuhotplug.h:229 [inline] kvm_guest_init+0x1f3/0x20f arch/x86/kernel/kvm.c:528 setup_arch+0x17e8/0x1a02 arch/x86/kernel/setup.c:1266 start_kernel+0xa5/0x74f init/main.c:530 x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:378 x86_64_start_kernel+0x77/0x7a arch/x86/kernel/head64.c:359 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:237 -> #0 (cpu_hotplug_lock.rw_sem){++++}: check_prevs_add kernel/locking/lockdep.c:2031 [inline] validate_chain kernel/locking/lockdep.c:2473 [inline] __lock_acquire+0x3498/0x47f0 kernel/locking/lockdep.c:3500 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] cpus_read_lock+0x42/0x90 kernel/cpu.c:293 get_online_cpus include/linux/cpu.h:117 [inline] lru_add_drain_all+0xe/0x20 mm/swap.c:729 shmem_wait_for_pins mm/shmem.c:2672 [inline] shmem_add_seals+0x3df/0x1060 mm/shmem.c:2780 shmem_fcntl+0xfe/0x130 mm/shmem.c:2815 do_fcntl+0x73e/0x1160 fs/fcntl.c:421 SYSC_fcntl fs/fcntl.c:463 [inline] SyS_fcntl+0xdc/0x120 fs/fcntl.c:448 entry_SYSCALL_64_fastpath+0x1f/0x96 other info that might help us debug this: Chain exists of: cpu_hotplug_lock.rw_sem --> &pipe->mutex/1 --> &sb->s_type->i_mutex_key#10 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&sb->s_type->i_mutex_key#10); lock(&pipe->mutex/1); lock(&sb->s_type->i_mutex_key#10); lock(cpu_hotplug_lock.rw_sem); *** DEADLOCK *** 1 lock held by syz-executor1/9185: #0: (&sb->s_type->i_mutex_key#10){++++}, at: [<0000000083ff7392>] inode_lock include/linux/fs.h:713 [inline] #0: (&sb->s_type->i_mutex_key#10){++++}, at: [<0000000083ff7392>] shmem_add_seals+0x197/0x1060 mm/shmem.c:2768 stack backtrace: CPU: 1 PID: 9185 Comm: syz-executor1 Not tainted 4.15.0-rc2+ #214 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+0x42d/0x610 kernel/locking/lockdep.c:1271 check_prev_add+0x666/0x15f0 kernel/locking/lockdep.c:1914 check_prevs_add kernel/locking/lockdep.c:2031 [inline] validate_chain kernel/locking/lockdep.c:2473 [inline] __lock_acquire+0x3498/0x47f0 kernel/locking/lockdep.c:3500 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:4004 percpu_down_read_preempt_disable include/linux/percpu-rwsem.h:36 [inline] percpu_down_read include/linux/percpu-rwsem.h:59 [inline] cpus_read_lock+0x42/0x90 kernel/cpu.c:293 get_online_cpus include/linux/cpu.h:117 [inline] lru_add_drain_all+0xe/0x20 mm/swap.c:729 shmem_wait_for_pins mm/shmem.c:2672 [inline] shmem_add_seals+0x3df/0x1060 mm/shmem.c:2780 shmem_fcntl+0xfe/0x130 mm/shmem.c:2815 do_fcntl+0x73e/0x1160 fs/fcntl.c:421 SYSC_fcntl fs/fcntl.c:463 [inline] SyS_fcntl+0xdc/0x120 fs/fcntl.c:448 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452a39 RSP: 002b:00007f9a9c98ac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000048 RAX: ffffffffffffffda RBX: 0000000000758190 RCX: 0000000000452a39 RDX: 000000000000000c RSI: 0000000000000409 RDI: 0000000000000018 RBP: 00000000000003f1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f3f38 R13: 00000000ffffffff R14: 00007f9a9c98b6d4 R15: 0000000000000002 device syz7 entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl loop: Write error at byte offset 0, length 512. print_req_error: I/O error, dev loop4, sector 0 Buffer I/O error on dev loop4, logical block 0, lost async page write binder: 9262:9266 ioctl 40286608 5 returned -22 binder: 9262:9275 ioctl 40046205 3 returned -22 dccp_v4_rcv: dropped packet with invalid checksum binder: 9262:9266 ioctl 40046205 3 returned -22 binder: 9262:9266 ERROR: BC_REGISTER_LOOPER called without request binder: 9266 RLIMIT_NICE not set audit: type=1400 audit(1512840744.999:632): avc: denied { dyntransition } for pid=9285 comm="syz-executor5" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0,c1 tclass=process permissive=1 binder: 9266 RLIMIT_NICE not set binder: 9266 RLIMIT_NICE not set binder_alloc: 9262: binder_alloc_buf, no vma binder: 9262:9266 transaction failed 29189/-3, size 32-8 line 2890 binder: send failed reply for transaction 67 to 9262:9296 audit: type=1400 audit(1512840745.019:633): avc: denied { dac_read_search } for pid=9285 comm="syz-executor5" capability=2 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0,c1 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0,c1 tclass=cap_userns permissive=1 binder: 9262:9266 Release 1 refcount change on invalid ref 1 ret -22 binder: 9262:9266 got transaction to invalid handle binder: 9262:9266 transaction failed 29201/-22, size 24-32 line 2775 binder: 9262:9266 ioctl 40046205 1000 returned -22 binder: 9262:9266 ioctl c0306201 204dcfd0 returned -14 dccp_v4_rcv: dropped packet with invalid checksum binder: 9262:9296 ioctl 40046205 3 returned -22 binder: 9262:9266 ioctl 40286608 5 returned -22 binder: 9262:9296 ioctl 40046205 3 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 9262:9296 ioctl 40046207 0 returned -16 binder_alloc: 9262: binder_alloc_buf, no vma binder: 9262:9296 transaction failed 29189/-3, size 0-0 line 2890 binder: 9262:9266 ERROR: BC_REGISTER_LOOPER called without request binder: 9266 RLIMIT_NICE not set binder: 9262:9266 got reply transaction with no transaction stack binder: 9262:9266 transaction failed 29201/-71, size 32-8 line 2690 binder: 9262:9266 Release 1 refcount change on invalid ref 1 ret -22 binder: 9262:9266 got transaction to invalid handle binder: 9262:9266 transaction failed 29201/-22, size 24-32 line 2775 binder: 9262:9296 ioctl 40046205 1000 returned -22 sctp: [Deprecated]: syz-executor4 (pid 9334) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor4 (pid 9338) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 netlink: 2 bytes leftover after parsing attributes in process `syz-executor7'. loop_reread_partitions: partition scan of loop4 (-\t@r9hxGQ:[il L*@R-Tr-x) failed (rc=-13) netlink: 2 bytes leftover after parsing attributes in process `syz-executor7'. devpts: called with bogus options QAT: Invalid ioctl audit: type=1326 audit(1512840745.628:634): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=9383 comm="syz-executor4" exe="/root/syz-executor4" sig=9 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x0 netlink: 4 bytes leftover after parsing attributes in process `syz-executor0'. QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1326 audit(1512840745.742:635): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=9383 comm="syz-executor4" exe="/root/syz-executor4" sig=9 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0x0 devpts: called with bogus options audit: type=1400 audit(1512840745.817:636): avc: denied { bind } for pid=9441 comm="syz-executor4" 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(1512840745.820:637): avc: denied { getattr } for pid=9441 comm="syz-executor4" 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 QAT: Invalid ioctl QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=6 nlmsg_type=82 sclass=netlink_xfrm_socket pig=9538 comm=syz-executor5 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=82 sclass=netlink_xfrm_socket pig=9548 comm=syz-executor5 audit: type=1326 audit(1512840746.254:638): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=9547 comm="syz-executor2" exe="/root/syz-executor2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0xffff0000 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1326 audit(1512840746.428:639): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=9547 comm="syz-executor2" exe="/root/syz-executor2" sig=31 arch=c000003e syscall=202 compat=0 ip=0x452a39 code=0xffff0000 audit: type=1400 audit(1512840746.540:640): avc: denied { write } for pid=9615 comm="syz-executor7" path="socket:[31325]" dev="sockfs" ino=31325 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 rfkill: input handler disabled rfkill: input handler enabled loop_reread_partitions: partition scan of loop4 () failed (rc=-13) dccp_invalid_packet: P.Data Offset(4) too small dccp_invalid_packet: P.Data Offset(4) too small binder: 9821:9825 ERROR: BC_REGISTER_LOOPER called without request binder: 9825 RLIMIT_NICE not set nla_parse: 5 callbacks suppressed netlink: 5 bytes leftover after parsing attributes in process `syz-executor1'. binder_alloc: binder_alloc_mmap_handler: 9821 20000000-20002000 already mapped failed -16 binder: 9821:9838 ERROR: BC_REGISTER_LOOPER called without request binder: 9838 RLIMIT_NICE not set binder: 9821:9825 transaction failed 29189/-22, size 0-0 line 2775 binder: 9821:9838 got reply transaction with no transaction stack binder: 9821:9838 transaction failed 29201/-71, size 24-8 line 2690 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 sctp: [Deprecated]: syz-executor4 (pid 9883) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor4 (pid 9902) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead device eql entered promiscuous mode device eql left promiscuous mode netlink: 25 bytes leftover after parsing attributes in process `syz-executor7'. device gre0 entered promiscuous mode binder_alloc: 10092: binder_alloc_buf, no vma device gre0 entered promiscuous mode binder: 10092:10096 transaction failed 29189/-3, size 64-48 line 2890 QAT: Invalid ioctl binder: BINDER_SET_CONTEXT_MGR already set binder: 10092:10104 ioctl 40046207 0 returned -16 binder_alloc: 10092: binder_alloc_buf, no vma QAT: Invalid ioctl binder: 10092:10096 transaction failed 29189/-3, size 64-48 line 2890 tmpfs: No value for mount option 'I' tmpfs: No value for mount option 'I' device syz3 entered promiscuous mode QAT: Invalid ioctl kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 10424 Comm: syz-executor4 Not tainted 4.15.0-rc2+ #214 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__le32_to_cpup include/uapi/linux/byteorder/little_endian.h:58 [inline] RIP: 0010:le32_to_cpuvp crypto/chacha20_generic.c:19 [inline] RIP: 0010:crypto_chacha20_init crypto/chacha20_generic.c:58 [inline] RIP: 0010:crypto_chacha20_crypt+0x537/0xbd0 crypto/chacha20_generic.c:91 RSP: 0018:ffff8801bf0474a0 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 00000000e6000000 RCX: ffffffff8226bafb RDX: 0000000000000000 RSI: ffffc90001d0f000 RDI: ffff8801bf04753c RBP: ffff8801bf0476c0 R08: ffffed0037c6839c R09: ffff8801be341cc0 R10: ffff8801bf0476e0 R11: ffffed0037c6839b R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: dffffc0000000000 FS: 00007f7821e80700(0000) GS:ffff8801db400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7821e5f000 CR3: 00000001cc4c4000 CR4: 00000000001426f0 Call Trace: chacha20_simd+0xe4/0x410 arch/x86/crypto/chacha20_glue.c:78 crypto_skcipher_decrypt include/crypto/skcipher.h:463 [inline] _skcipher_recvmsg crypto/algif_skcipher.c:126 [inline] skcipher_recvmsg+0x739/0xf20 crypto/algif_skcipher.c:165 sock_recvmsg_nosec net/socket.c:809 [inline] sock_recvmsg+0xc9/0x110 net/socket.c:816 sock_read_iter+0x361/0x560 net/socket.c:893 call_read_iter include/linux/fs.h:1766 [inline] aio_read+0x2b0/0x3a0 fs/aio.c:1501 io_submit_one fs/aio.c:1611 [inline] do_io_submit+0xf99/0x14f0 fs/aio.c:1682 SYSC_io_submit fs/aio.c:1707 [inline] SyS_io_submit+0x27/0x30 fs/aio.c:1704 entry_SYSCALL_64_fastpath+0x1f/0x96 RIP: 0033:0x452a39 RSP: 002b:00007f7821e7fc58 EFLAGS: 00000212 ORIG_RAX: 00000000000000d1 RAX: ffffffffffffffda RBX: 0000000000758020 RCX: 0000000000452a39 RDX: 0000000020738000 RSI: 0000000000000002 RDI: 00007f7821e5f000 RBP: 000000000000057b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f6428 R13: 00000000ffffffff R14: 00007f7821e806d4 R15: 0000000000000000 Code: 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 d6 05 00 00 4c 89 ea 48 b8 00 00 00 00 00 fc ff df 89 9d 7c fe ff ff 48 c1 ea 03 <0f> b6 14 02 4c 89 e8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 RIP: __le32_to_cpup include/uapi/linux/byteorder/little_endian.h:58 [inline] RSP: ffff8801bf0474a0 RIP: le32_to_cpuvp crypto/chacha20_generic.c:19 [inline] RSP: ffff8801bf0474a0 RIP: crypto_chacha20_init crypto/chacha20_generic.c:58 [inline] RSP: ffff8801bf0474a0 RIP: crypto_chacha20_crypt+0x537/0xbd0 crypto/chacha20_generic.c:91 RSP: ffff8801bf0474a0 ---[ end trace 50b11fe516e235f5 ]---