Subject: Re: [PATCH crypto] crypto: algboss: fix NULL pointer dereference in cryptomgr_probe

From: Daniel Borkmann <[email-masked]>
Date: Mon, 24 Jun 2013 16:33:06 +0200

On 06/24/2013 03:59 PM, Herbert Xu wrote:
...
> Author: Herbert Xu <[email-masked]>
> 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: <[email-masked]> # 3.6+
>      Reported-by: Daniel Borkmann <[email-masked]>
>      Signed-off-by: Herbert Xu <[email-masked]>

Tested-by: Daniel Borkmann <[email-masked]>

This fixes the panic for me with the reproducer I sent off-list.

Thanks Herbert !