syzbot


possible deadlock in fifo_open

Status: public: reported C repro on 2019/04/11 00:00
Reported-by: syzbot+2539f886ed2884843fa6@syzkaller.appspotmail.com
First crash: 2253d, last: 2062d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-44 possible deadlock in fifo_open C 696 1816d 2053d 0/2 public: reported C repro on 2019/04/12 00:00
upstream possible deadlock in fifo_open fs C 2097 2069d 2549d 0/28 closed as dup on 2017/12/12 21:25

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
audit: type=1400 audit(1553307833.191:7): avc:  denied  { map } for  pid=1789 comm="syz-executor142" path="/root/syz-executor142915877" dev="sda1" ino=16482 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1
======================================================
WARNING: possible circular locking dependency detected
4.14.107+ #34 Not tainted
------------------------------------------------------
syz-executor142/1789 is trying to acquire lock:
 (&pipe->mutex/1){+.+.}, at: [<ffffffffb1774df6>] __pipe_lock fs/pipe.c:88 [inline]
 (&pipe->mutex/1){+.+.}, at: [<ffffffffb1774df6>] fifo_open+0x156/0x9b0 fs/pipe.c:921

but task is already holding lock:
 (&sig->cred_guard_mutex){+.+.}, at: [<ffffffffb176f211>] prepare_bprm_creds+0x51/0x110 fs/exec.c:1389

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&sig->cred_guard_mutex){+.+.}:

-> #0 (&pipe->mutex/1){+.+.}:

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&sig->cred_guard_mutex);
                               lock(&pipe->mutex/1);
                               lock(&sig->cred_guard_mutex);
  lock(&pipe->mutex/1);

 *** DEADLOCK ***

1 lock held by syz-executor142/1789:
 #0:  (&sig->cred_guard_mutex){+.+.}, at: [<ffffffffb176f211>] prepare_bprm_creds+0x51/0x110 fs/exec.c:1389

stack backtrace:
CPU: 0 PID: 1789 Comm: syz-executor142 Not tainted 4.14.107+ #34
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0xb9/0x10e lib/dump_stack.c:53
 print_circular_bug.isra.0.cold+0x2dc/0x425 kernel/locking/lockdep.c:1258

Crashes (586):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/03/23 02:26 android-4.14 740617b2f48f 3361bde5 .config console log report syz C ci-android-414-kasan-gce-root
2019/03/16 16:56 android-4.14 8ed9bc6e6401 bab43553 .config console log report syz C ci-android-414-kasan-gce-root
2019/01/14 11:48 android-4.14 da2880fa47ec 95485883 .config console log report syz C ci-android-414-kasan-gce-root
2019/01/11 10:00 android-4.14 fab7352ca8d1 80dde172 .config console log report syz C ci-android-414-kasan-gce-root
2019/01/08 11:50 android-4.14 3c207c880674 37dd2683 .config console log report syz C ci-android-414-kasan-gce-root
2019/01/08 00:38 android-4.14 3c207c880674 69d69aa9 .config console log report syz C ci-android-414-kasan-gce-root
2019/01/02 04:14 android-4.14 7d2d5fc1acda 3d85f48c .config console log report syz C ci-android-414-kasan-gce-root
2019/01/01 21:17 android-4.14 7d2d5fc1acda 3d85f48c .config console log report syz C ci-android-414-kasan-gce-root
2018/12/31 17:00 android-4.14 7d2d5fc1acda 2b42fdc8 .config console log report syz C ci-android-414-kasan-gce-root
2018/12/30 22:26 android-4.14 7d2d5fc1acda 9942de5f .config console log report syz C ci-android-414-kasan-gce-root
2018/12/25 02:55 android-4.14 815e34f802d8 8a41a0ad .config console log report syz C ci-android-414-kasan-gce-root
2018/12/21 08:27 android-4.14 e9c7ae0eb4cb 2b497001 .config console log report syz C ci-android-414-kasan-gce-root
2018/12/16 06:21 android-4.14 4ee7197c44f6 def91db3 .config console log report syz C ci-android-414-kasan-gce-root
2018/12/08 14:22 android-4.14 13b8d9fdf844 60562a1d .config console log report syz C ci-android-414-kasan-gce-root
2018/11/26 05:16 android-4.14 ea91d158d712 3d3ec907 .config console log report syz C ci-android-414-kasan-gce-root
2018/10/26 22:46 android-4.14 4ed22187defd a8292de9 .config console log report syz C ci-android-414-kasan-gce-root
2018/10/24 05:34 android-4.14 ff26b00b484b a8292de9 .config console log report syz C ci-android-414-kasan-gce-root
2018/10/23 04:26 android-4.14 a3ac63b18873 ecb386fe .config console log report syz C ci-android-414-kasan-gce-root
2018/10/17 09:29 android-4.14 6d46bcc5a747 1ba7fd7e .config console log report syz C ci-android-414-kasan-gce-root
2018/10/16 22:49 android-4.14 48091d94336e 1ba7fd7e .config console log report syz C ci-android-414-kasan-gce-root
2018/10/15 06:47 android-4.14 48091d94336e caf12900 .config console log report syz C ci-android-414-kasan-gce-root
2018/10/15 01:29 android-4.14 48091d94336e caf12900 .config console log report syz C ci-android-414-kasan-gce-root
2018/10/13 19:34 android-4.14 48091d94336e caf12900 .config console log report syz C ci-android-414-kasan-gce-root
2018/10/11 14:49 android-4.14 b7e40c3d444a 5f818b4b .config console log report syz C ci-android-414-kasan-gce-root
2018/10/08 15:02 android-4.14 d33692e8014d 8b311eaf .config console log report syz C ci-android-414-kasan-gce-root
2018/10/06 14:02 android-4.14 d33692e8014d 8b311eaf .config console log report syz C ci-android-414-kasan-gce-root
2018/10/04 19:47 android-4.14 8c958cd74663 8b311eaf .config console log report syz C ci-android-414-kasan-gce-root
2018/09/29 23:12 android-4.14 84ae3e35e1ce 41e4b329 .config console log report syz C ci-android-414-kasan-gce-root
2018/09/29 08:50 android-4.14 56aae8ee7423 41e4b329 .config console log report syz C ci-android-414-kasan-gce-root
2018/09/25 08:45 android-4.14 666c420fa3ea 0e7547d7 .config console log report syz C ci-android-414-kasan-gce-root
2018/09/23 17:45 android-4.14 666c420fa3ea 37079712 .config console log report syz C ci-android-414-kasan-gce-root
2019/04/02 16:44 android-4.14 140cda105bb8 dfd3394d .config console log report ci-android-414-kasan-gce-root
2019/03/27 09:02 android-4.14 db689dd813b7 55684ce1 .config console log report ci-android-414-kasan-gce-root
2019/03/26 22:14 android-4.14 7df8ba42237b 55684ce1 .config console log report ci-android-414-kasan-gce-root
2019/03/26 05:13 android-4.14 02b246355459 55684ce1 .config console log report ci-android-414-kasan-gce-root
2019/03/22 01:43 android-4.14 cfbe30be85c4 dce6e62f .config console log report ci-android-414-kasan-gce-root
2019/03/20 17:46 android-4.14 0892a3e235e5 a664c187 .config console log report ci-android-414-kasan-gce-root
2019/03/20 01:11 android-4.14 0892a3e235e5 2458c1c6 .config console log report ci-android-414-kasan-gce-root
2019/03/19 02:06 android-4.14 ea583d160621 46264c32 .config console log report ci-android-414-kasan-gce-root
2019/03/18 21:25 android-4.14 8ed9bc6e6401 4656beca .config console log report ci-android-414-kasan-gce-root
2019/03/18 19:40 android-4.14 8ed9bc6e6401 4656beca .config console log report ci-android-414-kasan-gce-root
2019/03/16 21:19 android-4.14 8ed9bc6e6401 bab43553 .config console log report ci-android-414-kasan-gce-root
2019/03/16 09:42 android-4.14 8ed9bc6e6401 bab43553 .config console log report ci-android-414-kasan-gce-root
2019/03/15 02:21 android-4.14 8ed9bc6e6401 d72db19b .config console log report ci-android-414-kasan-gce-root
2019/03/13 21:19 android-4.14 b11964adfe4c 2881fc25 .config console log report ci-android-414-kasan-gce-root
2019/03/13 16:10 android-4.14 b11964adfe4c 2881fc25 .config console log report ci-android-414-kasan-gce-root
2019/03/12 17:45 android-4.14 b11964adfe4c a71bfb62 .config console log report ci-android-414-kasan-gce-root
2019/03/05 23:33 android-4.14 9ba09a217160 16559f86 .config console log report ci-android-414-kasan-gce-root
2019/03/03 02:34 android-4.14 934272e9380b 1c0e457a .config console log report ci-android-414-kasan-gce-root
2019/03/02 05:16 android-4.14 934272e9380b 68d9e495 .config console log report ci-android-414-kasan-gce-root
2019/03/01 03:53 android-4.14 0cc8f104f45a 09aeeba4 .config console log report ci-android-414-kasan-gce-root
2019/03/01 02:50 android-4.14 0cc8f104f45a 09aeeba4 .config console log report ci-android-414-kasan-gce-root
2019/02/28 20:16 android-4.14 0cc8f104f45a 09aeeba4 .config console log report ci-android-414-kasan-gce-root
2019/02/28 19:31 android-4.14 0cc8f104f45a 09aeeba4 .config console log report ci-android-414-kasan-gce-root
2019/02/28 12:10 android-4.14 0cc8f104f45a 09aeeba4 .config console log report ci-android-414-kasan-gce-root
2019/02/21 17:51 android-4.14 01709c953f89 3133098b .config console log report ci-android-414-kasan-gce-root
2019/02/21 07:41 android-4.14 01709c953f89 c95f0707 .config console log report ci-android-414-kasan-gce-root
2019/02/21 03:56 android-4.14 01709c953f89 c95f0707 .config console log report ci-android-414-kasan-gce-root
2019/02/15 12:01 android-4.14 6142833f8318 f6f233c0 .config console log report ci-android-414-kasan-gce-root
2019/02/09 17:40 android-4.14 57de59b3cf53 d75f7686 .config console log report ci-android-414-kasan-gce-root
2019/02/08 14:14 android-4.14 0116eb1061b0 aa4feb03 .config console log report ci-android-414-kasan-gce-root
2019/02/07 18:06 android-4.14 16edd85b6013 aa4feb03 .config console log report ci-android-414-kasan-gce-root
2019/02/04 05:41 android-4.14 80d7b06534fa c198d5dd .config console log report ci-android-414-kasan-gce-root
2019/02/02 22:57 android-4.14 80d7b06534fa c198d5dd .config console log report ci-android-414-kasan-gce-root
2019/01/29 05:23 android-4.14 63d1657d00e0 aa432daf .config console log report ci-android-414-kasan-gce-root
2019/01/25 23:14 android-4.14 e1f5ad7212eb ebf7a37c .config console log report ci-android-414-kasan-gce-root
2019/01/25 09:08 android-4.14 ca20dbf407cb bfab9cd8 .config console log report ci-android-414-kasan-gce-root
2019/01/24 15:08 android-4.14 d34411de9b95 ce1ccf97 .config console log report ci-android-414-kasan-gce-root
2019/01/23 08:26 android-4.14 a4580ffc17d3 b1ff06b2 .config console log report ci-android-414-kasan-gce-root
2019/01/23 05:47 android-4.14 a4580ffc17d3 b1ff06b2 .config console log report ci-android-414-kasan-gce-root
2019/01/23 04:44 android-4.14 a4580ffc17d3 b1ff06b2 .config console log report ci-android-414-kasan-gce-root
2019/01/23 04:10 android-4.14 a4580ffc17d3 b1ff06b2 .config console log report ci-android-414-kasan-gce-root
2019/01/22 20:51 android-4.14 a4580ffc17d3 b1ff06b2 .config console log report ci-android-414-kasan-gce-root
2019/01/22 19:23 android-4.14 a4580ffc17d3 985f75cc .config console log report ci-android-414-kasan-gce-root
2019/01/22 16:25 android-4.14 5a76363f1262 985f75cc .config console log report ci-android-414-kasan-gce-root
2019/01/22 12:51 android-4.14 5a76363f1262 985f75cc .config console log report ci-android-414-kasan-gce-root
* Struck through repros no longer work on HEAD.