Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310305

Re: [v2 PATCH 0/2] crypto: Fix race condition in *_check_key

From Dmitry Vyukov <dvyukov@google.com>
Newsgroups linux.kernel
Subject Re: [v2 PATCH 0/2] crypto: Fix race condition in *_check_key
Date 2016-01-15 18:40 +0100
Message-ID <qRgvV-RW-11@gated-at.bofh.it> (permalink)
References <qQsfM-7Bq-9@gated-at.bofh.it> <qQQUO-8fS-21@gated-at.bofh.it> <qR8ym-3Yi-23@gated-at.bofh.it> <qRd50-6Sf-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jan 15, 2016 at 2:59 PM, Herbert Xu <herbert@gondor.apana.org.au> wrote:
> 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.

With these patches the original bug is fixed and don't see any new.

Tested-by: Dmitry Vyukov <dvyukov@google.com>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

crypto: use-after-free in skcipher_sock_destruct Dmitry Vyukov <dvyukov@google.com> - 2016-01-13 13:00 +0100
  [PATCH 2/2] crypto: algif_skcipher - Fix race condition in  skcipher_check_key Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-14 15:20 +0100
  [PATCH 0/2] crypto: Fix race condition in *_check_key Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-14 15:20 +0100
    [PATCH 1/2] crypto: algif_hash - Fix race condition in hash_check_key Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-14 15:20 +0100
    Re: [PATCH 0/2] crypto: Fix race condition in *_check_key Dmitry Vyukov <dvyukov@google.com> - 2016-01-15 10:10 +0100
      [v2 PATCH 0/2] crypto: Fix race condition in *_check_key Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-15 15:00 +0100
        [v2 PATCH 1/2] crypto: algif_hash - Fix race condition in  hash_check_key Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-15 15:10 +0100
        [v2 PATCH 2/2] crypto: algif_skcipher - Fix race condition in  skcipher_check_key Herbert Xu <herbert@gondor.apana.org.au> - 2016-01-15 15:30 +0100
        Re: [v2 PATCH 0/2] crypto: Fix race condition in *_check_key Dmitry Vyukov <dvyukov@google.com> - 2016-01-15 18:40 +0100

csiph-web