[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160115135900.GA31813@gondor.apana.org.au>
Date: Fri, 15 Jan 2016 21:59:00 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Dmitry Vyukov <dvyukov@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
syzkaller <syzkaller@...glegroups.com>,
Kostya Serebryany <kcc@...gle.com>,
Alexander Potapenko <glider@...gle.com>,
Eric Dumazet <edumazet@...gle.com>,
Sasha Levin <sasha.levin@...cle.com>
Subject: [v2 PATCH 0/2] crypto: Fix race condition in *_check_key
On Fri, Jan 15, 2016 at 10:06:11AM +0100, Dmitry Vyukov wrote:
>
> With these patches I see lots of:
>
> [ INFO: possible recursive locking detected ]
> 4.4.0+ #250 Not tainted
> ---------------------------------------------
> syz-executor/16742 is trying to acquire lock:
> (sk_lock-AF_ALG){+.+.+.}, at: [< inline >] lock_sock
> include/net/sock.h:1480
> (sk_lock-AF_ALG){+.+.+.}, at: [<ffffffff828661d2>]
> hash_check_key.isra.3+0xd2/0x210 crypto/algif_hash.c:261
>
> but task is already holding lock:
> (sk_lock-AF_ALG){+.+.+.}, at: [< inline >] lock_sock
> include/net/sock.h:1480
> (sk_lock-AF_ALG){+.+.+.}, at: [<ffffffff82866126>]
> hash_check_key.isra.3+0x26/0x210 crypto/algif_hash.c:252
>
> other info that might help us debug this:
> Possible unsafe locking scenario:
>
> CPU0
> ----
> lock(sk_lock-AF_ALG);
> lock(sk_lock-AF_ALG);
>
> *** DEADLOCK ***
>
> May be due to missing lock nesting notation
Indeed. Here is an updated version.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists