From: Daniel Borkmann <dborkman@redhat.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: linux-crypto@vger.kernel.org, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH crypto] crypto: algboss: fix NULL pointer dereference in cryptomgr_probe
Date: Mon, 24 Jun 2013 16:33:06 +0200 [thread overview]
Message-ID: <51C858A2.40801@redhat.com> (raw)
In-Reply-To: <20130624135943.GA11776@gondor.apana.org.au>
On 06/24/2013 03:59 PM, Herbert Xu wrote:
...
> Author: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Mon Jun 24 21:57:42 2013 +0800
>
> crypto: algboss - Hold ref count on larval
>
...
>
> The use of wait_for_completion_interruptible is intentional so that
> we don't lock up the thread if a bug causes us to never wake up.
>
> This bug is caused by the helper thread using the larval without
> holding a reference count on it. If the helper thread completes
> after the original thread requesting for help has gone away and
> destroyed the larval, then we get the crash above.
>
> So the fix is to hold a reference count on the larval.
>
> Cc: <stable@vger.kernel.org> # 3.6+
> Reported-by: Daniel Borkmann <dborkman@redhat.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Daniel Borkmann <dborkman@redhat.com>
This fixes the panic for me with the reproducer I sent off-list.
Thanks Herbert !
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Borkmann <dborkman@redhat.com>
To: Herbert Xu <herbert@gondor.hengli.com.au>
Cc: linux-crypto@vger.kernel.org, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH crypto] crypto: algboss: fix NULL pointer dereference in cryptomgr_probe
Date: Mon, 24 Jun 2013 14:33:06 +0000 [thread overview]
Message-ID: <51C858A2.40801@redhat.com> (raw)
In-Reply-To: <20130624135943.GA11776@gondor.apana.org.au>
On 06/24/2013 03:59 PM, Herbert Xu wrote:
...
> Author: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Mon Jun 24 21:57:42 2013 +0800
>
> crypto: algboss - Hold ref count on larval
>
...
>
> The use of wait_for_completion_interruptible is intentional so that
> we don't lock up the thread if a bug causes us to never wake up.
>
> This bug is caused by the helper thread using the larval without
> holding a reference count on it. If the helper thread completes
> after the original thread requesting for help has gone away and
> destroyed the larval, then we get the crash above.
>
> So the fix is to hold a reference count on the larval.
>
> Cc: <stable@vger.kernel.org> # 3.6+
> Reported-by: Daniel Borkmann <dborkman@redhat.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Daniel Borkmann <dborkman@redhat.com>
This fixes the panic for me with the reproducer I sent off-list.
Thanks Herbert !
next prev parent reply other threads:[~2013-06-24 14:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-20 8:00 [PATCH crypto] crypto: algboss: fix NULL pointer dereference in cryptomgr_probe Daniel Borkmann
2013-06-20 8:00 ` Daniel Borkmann
2013-06-20 13:33 ` Herbert Xu
2013-06-20 13:33 ` Herbert Xu
2013-06-24 13:59 ` Herbert Xu
2013-06-24 13:59 ` Herbert Xu
2013-06-24 14:33 ` Daniel Borkmann [this message]
2013-06-24 14:33 ` Daniel Borkmann
-- strict thread matches above, loose matches on Subject: below --
2013-06-20 9:18 Daniel Borkmann
2013-06-20 9:18 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51C858A2.40801@redhat.com \
--to=dborkman@redhat.com \
--cc=herbert@gondor.hengli.com.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.