Re: [PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-28 Thread Herbert Xu
On Fri, Nov 24, 2017 at 08:22:07AM +, Corentin Labbe wrote: > When a cipher fails to register in aes_init(), the error path goes thought > aes_exit() then crypto_unregister_skciphers(). > Since aes_exit calls also crypto_unregister_skcipher, this triggers a > refcount_t: underflow;

Re: [PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-28 Thread Herbert Xu
On Fri, Nov 24, 2017 at 08:22:07AM +, Corentin Labbe wrote: > When a cipher fails to register in aes_init(), the error path goes thought > aes_exit() then crypto_unregister_skciphers(). > Since aes_exit calls also crypto_unregister_skcipher, this triggers a > refcount_t: underflow;

[PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-24 Thread Corentin Labbe
When a cipher fails to register in aes_init(), the error path goes thought aes_exit() then crypto_unregister_skciphers(). Since aes_exit calls also crypto_unregister_skcipher, this triggers a refcount_t: underflow; use-after-free. Signed-off-by: Corentin Labbe --- Changes

[PATCH v2] ARM64: crypto: do not call crypto_unregister_skcipher twice on error

2017-11-24 Thread Corentin Labbe
When a cipher fails to register in aes_init(), the error path goes thought aes_exit() then crypto_unregister_skciphers(). Since aes_exit calls also crypto_unregister_skcipher, this triggers a refcount_t: underflow; use-after-free. Signed-off-by: Corentin Labbe --- Changes since v1: - Instead of