Hello,
syzbot found the following crash on:
HEAD commit: 62872f95 Merge 4.4.174 into android-4.4
git tree: android-4.4
console output:
https://syzkaller.appspot.com/x/log.txt?x=143fe6df200000
kernel config:
https://syzkaller.appspot.com/x/.config?x=47bc4dd423780c4a
dashboard link:
https://syzkaller.appspot.com/bug?extid=40690beda1a2266cd4b2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+40690b...@syzkaller.appspotmail.com
audit: type=1400 audit(1553227415.630:460): avc: denied { create } for
pid=14960 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=1
======================================================
[ INFO: possible circular locking dependency detected ]
4.4.174+ #4 Not tainted
-------------------------------------------------------
syz-executor.2/14953 is trying to acquire lock:
(&pipe->mutex/1){+.+.+.}, at: [<ffffffff814af8b3>] pipe_lock_nested
fs/pipe.c:65 [inline]
(&pipe->mutex/1){+.+.+.}, at: [<ffffffff814af8b3>] pipe_lock+0x63/0x80
fs/pipe.c:73
but task is already holding lock:
(sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] file_start_write
include/linux/fs.h:2543 [inline]
(sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] do_splice
fs/splice.c:1403 [inline]
(sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] SYSC_splice
fs/splice.c:1707 [inline]
(sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] SyS_splice+0xf2d/0x13a0
fs/splice.c:1690
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450
kernel/locking/lockdep.c:3592
[<ffffffff8149ea2f>] percpu_down_read
include/linux/percpu-rwsem.h:26 [inline]
[<ffffffff8149ea2f>] __sb_start_write+0x1af/0x310 fs/super.c:1239
[<ffffffff816c3af4>] sb_start_write include/linux/fs.h:1517 [inline]
[<ffffffff816c3af4>] ext4_run_li_request fs/ext4/super.c:2685
[inline]
[<ffffffff816c3af4>] ext4_lazyinit_thread fs/ext4/super.c:2784
[inline]
[<ffffffff816c3af4>] ext4_lazyinit_thread+0x1e4/0x7b0
fs/ext4/super.c:2760
[<ffffffff811342c3>] kthread+0x273/0x310 kernel/kthread.c:211
[<ffffffff82718fc5>] ret_from_fork+0x55/0x80
arch/x86/entry/entry_64.S:537
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450
kernel/locking/lockdep.c:3592
audit: type=1400 audit(1553227415.800:461): avc: denied { write } for
pid=14960 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=1
[<ffffffff8270c191>] __mutex_lock_common kernel/locking/mutex.c:521
[inline]
[<ffffffff8270c191>] mutex_lock_nested+0xc1/0xb80
kernel/locking/mutex.c:621
[<ffffffff816cdacd>] ext4_register_li_request+0x2fd/0x7d0
fs/ext4/super.c:2972
[<ffffffff816cf306>] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922
[<ffffffff814a1ccb>] do_remount_sb2+0x41b/0x7a0 fs/super.c:781
[<ffffffff815028ab>] do_remount fs/namespace.c:2347 [inline]
[<ffffffff815028ab>] do_mount+0xfdb/0x2a40 fs/namespace.c:2860
[<ffffffff81504d00>] SYSC_mount fs/namespace.c:3063 [inline]
[<ffffffff81504d00>] SyS_mount+0x130/0x1d0 fs/namespace.c:3041
[<ffffffff82718ba1>] entry_SYSCALL_64_fastpath+0x1e/0x9a
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450
kernel/locking/lockdep.c:3592
[<ffffffff8270c191>] __mutex_lock_common kernel/locking/mutex.c:521
[inline]
[<ffffffff8270c191>] mutex_lock_nested+0xc1/0xb80
kernel/locking/mutex.c:621
[ 436.857403] audit: type=1400 audit(1553227415.890:462): avc:
denied { write } for pid=14934 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=1
[<ffffffff816cd859>] ext4_register_li_request+0x89/0x7d0
fs/ext4/super.c:2945
[<ffffffff816cf306>] ext4_remount+0x1366/0x1b90 fs/ext4/super.c:4922
[<ffffffff814a1ccb>] do_remount_sb2+0x41b/0x7a0 fs/super.c:781
[<ffffffff815028ab>] do_remount fs/namespace.c:2347 [inline]
[<ffffffff815028ab>] do_mount+0xfdb/0x2a40 fs/namespace.c:2860
[<ffffffff81504d00>] SYSC_mount fs/namespace.c:3063 [inline]
[<ffffffff81504d00>] SyS_mount+0x130/0x1d0 fs/namespace.c:3041
[<ffffffff82718ba1>] entry_SYSCALL_64_fastpath+0x1e/0x9a
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450
kernel/locking/lockdep.c:3592
[<ffffffff827139a2>] down_read+0x42/0x60 kernel/locking/rwsem.c:22
[<ffffffff814a1411>] iterate_supers+0xe1/0x250 fs/super.c:547
[<ffffffff819b19f7>] selinux_complete_init+0x2f/0x31
security/selinux/hooks.c:6154
[<ffffffff819a353d>] security_load_policy+0x69d/0x9c0
security/selinux/ss/services.c:2060
[<ffffffff81979e55>] sel_write_load+0x175/0xf90
security/selinux/selinuxfs.c:535
[<ffffffff81496916>] __vfs_write+0x116/0x3d0 fs/read_write.c:491
[<ffffffff81498612>] vfs_write+0x182/0x4e0 fs/read_write.c:540
[<ffffffff8149ac4c>] SYSC_write fs/read_write.c:587 [inline]
[<ffffffff8149ac4c>] SyS_write+0xdc/0x1c0 fs/read_write.c:579
[ 436.986766] audit: type=1400 audit(1553227416.030:463): avc:
denied { read } for pid=14960 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=1
[<ffffffff82718ba1>] entry_SYSCALL_64_fastpath+0x1e/0x9a
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450
kernel/locking/lockdep.c:3592
[<ffffffff8270c191>] __mutex_lock_common kernel/locking/mutex.c:521
[inline]
[<ffffffff8270c191>] mutex_lock_nested+0xc1/0xb80
kernel/locking/mutex.c:621
[<ffffffff81977a39>] sel_commit_bools_write+0x89/0x260
security/selinux/selinuxfs.c:1142
[<ffffffff81496916>] __vfs_write+0x116/0x3d0 fs/read_write.c:491
[<ffffffff81496ce2>] __kernel_write+0x112/0x370 fs/read_write.c:513
[<ffffffff81532e6d>] write_pipe_buf+0x15d/0x1f0 fs/splice.c:1074
[<ffffffff81533b6e>] splice_from_pipe_feed fs/splice.c:776 [inline]
[<ffffffff81533b6e>] __splice_from_pipe+0x37e/0x7a0 fs/splice.c:901
[<ffffffff81536be8>] splice_from_pipe+0x108/0x170 fs/splice.c:936
[<ffffffff81536cdc>] default_file_splice_write+0x3c/0x80
fs/splice.c:1086
[<ffffffff81537d31>] do_splice_from fs/splice.c:1128 [inline]
[<ffffffff81537d31>] do_splice fs/splice.c:1404 [inline]
[<ffffffff81537d31>] SYSC_splice fs/splice.c:1707 [inline]
[<ffffffff81537d31>] SyS_splice+0xd71/0x13a0 fs/splice.c:1690
[<ffffffff82718ba1>] entry_SYSCALL_64_fastpath+0x1e/0x9a
[<ffffffff81202d86>] check_prev_add kernel/locking/lockdep.c:1853
[inline]
[<ffffffff81202d86>] check_prevs_add kernel/locking/lockdep.c:1958
[inline]
[<ffffffff81202d86>] validate_chain kernel/locking/lockdep.c:2144
[inline]
[<ffffffff81202d86>] __lock_acquire+0x37d6/0x4f50
kernel/locking/lockdep.c:3213
audit: type=1400 audit(1553227416.140:464): avc: denied { read } for
pid=14934 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=1
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450
kernel/locking/lockdep.c:3592
[<ffffffff8270c191>] __mutex_lock_common kernel/locking/mutex.c:521
[inline]
[<ffffffff8270c191>] mutex_lock_nested+0xc1/0xb80
kernel/locking/mutex.c:621
[<ffffffff814af8b3>] pipe_lock_nested fs/pipe.c:65 [inline]
[<ffffffff814af8b3>] pipe_lock+0x63/0x80 fs/pipe.c:73
[<ffffffff815342e9>] iter_file_splice_write+0x179/0xb30
fs/splice.c:974
[<ffffffff81537d31>] do_splice_from fs/splice.c:1128 [inline]
[<ffffffff81537d31>] do_splice fs/splice.c:1404 [inline]
[<ffffffff81537d31>] SYSC_splice fs/splice.c:1707 [inline]
[<ffffffff81537d31>] SyS_splice+0xd71/0x13a0 fs/splice.c:1690
[<ffffffff82718ba1>] entry_SYSCALL_64_fastpath+0x1e/0x9a
other info that might help us debug this:
Chain exists of:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(sb_writers#4);
lock(&eli->li_list_mtx);
lock(sb_writers#4);
lock(&pipe->mutex/1);
*** DEADLOCK ***
1 lock held by syz-executor.2/14953:
#0: (sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] file_start_write
include/linux/fs.h:2543 [inline]
#0: (sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] do_splice
fs/splice.c:1403 [inline]
#0: (sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>] SYSC_splice
fs/splice.c:1707 [inline]
#0: (sb_writers#4){.+.+.+}, at: [<ffffffff81537eed>]
SyS_splice+0xf2d/0x13a0 fs/splice.c:1690
stack backtrace:
CPU: 0 PID: 14953 Comm: syz-executor.2 Not tainted 4.4.174+ #4
0000000000000000 18d547d6cf8cc394 ffff8801bde978b0 ffffffff81aad1a1
ffffffff84057a80 ffff8800b4e997c0 ffffffff83abd2b0 ffffffff83abc380
ffffffff83ac8080 ffff8801bde97900 ffffffff813abcda ffffffff83e1f600
Call Trace:
[<ffffffff81aad1a1>] __dump_stack lib/dump_stack.c:15 [inline]
[<ffffffff81aad1a1>] dump_stack+0xc1/0x120 lib/dump_stack.c:51
[<ffffffff813abcda>] print_circular_bug.cold+0x2f7/0x44e
kernel/locking/lockdep.c:1226
[<ffffffff81202d86>] check_prev_add kernel/locking/lockdep.c:1853 [inline]
[<ffffffff81202d86>] check_prevs_add kernel/locking/lockdep.c:1958 [inline]
[<ffffffff81202d86>] validate_chain kernel/locking/lockdep.c:2144 [inline]
[<ffffffff81202d86>] __lock_acquire+0x37d6/0x4f50
kernel/locking/lockdep.c:3213
[<ffffffff81205f6e>] lock_acquire+0x15e/0x450 kernel/locking/lockdep.c:3592
[<ffffffff8270c191>] __mutex_lock_common kernel/locking/mutex.c:521
[inline]
[<ffffffff8270c191>] mutex_lock_nested+0xc1/0xb80
kernel/locking/mutex.c:621
[<ffffffff814af8b3>] pipe_lock_nested fs/pipe.c:65 [inline]
[<ffffffff814af8b3>] pipe_lock+0x63/0x80 fs/pipe.c:73
[<ffffffff815342e9>] iter_file_splice_write+0x179/0xb30 fs/splice.c:974
[<ffffffff81537d31>] do_splice_from fs/splice.c:1128 [inline]
[<ffffffff81537d31>] do_splice fs/splice.c:1404 [inline]
[<ffffffff81537d31>] SYSC_splice fs/splice.c:1707 [inline]
[<ffffffff81537d31>] SyS_splice+0xd71/0x13a0 fs/splice.c:1690
[<ffffffff82718ba1>] entry_SYSCALL_64_fastpath+0x1e/0x9a
audit: type=1400 audit(1553227416.560:465): avc: denied { create } for
pid=14960 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=1
netlink: 12 bytes leftover after parsing attributes in process
`syz-executor.1'.
tc_dump_action: action bad kind
audit: type=1400 audit(1553227417.010:466): avc: denied { create } for
pid=15003 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_netfilter_socket permissive=1
audit: type=1400 audit(1553227417.220:467): avc: denied { write } for
pid=15003 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_netfilter_socket permissive=1
audit: type=1400 audit(1553227417.250:468): avc: denied { create } for
pid=15003 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_netfilter_socket permissive=1
---
This bug is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.