Re: [PATCH v2] crypto/mcryptd: Check mcryptd algorithm compatibility

2016-12-07 Thread Herbert Xu
On Mon, Dec 05, 2016 at 11:46:31AM -0800, Tim Chen wrote: > Algorithms not compatible with mcryptd could be spawned by mcryptd > with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name > construct. This causes mcryptd to crash the kernel if an arbitrary > "alg" is incompatible and no

Re: [PATCH v2] crypto/mcryptd: Check mcryptd algorithm compatibility

2016-12-07 Thread Herbert Xu
On Tue, Dec 06, 2016 at 04:07:46PM -0500, Mikulas Patocka wrote: > I think a proper fix would be to find the reason why mcryptd crashes and > fix that reason (i.e. make it fail in mcryptd_create_hash rather than > crash). > > Testing flags could fix the bug for now but it could backfire later wh

Re: [PATCH v2] crypto/mcryptd: Check mcryptd algorithm compatibility

2016-12-06 Thread Mikulas Patocka
I think a proper fix would be to find the reason why mcryptd crashes and fix that reason (i.e. make it fail in mcryptd_create_hash rather than crash). Testing flags could fix the bug for now but it could backfire later when more algorithms are added. Mikulas On Mon, 5 Dec 2016, Tim Chen wro

[PATCH v2] crypto/mcryptd: Check mcryptd algorithm compatibility

2016-12-05 Thread Tim Chen
Algorithms not compatible with mcryptd could be spawned by mcryptd with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name construct. This causes mcryptd to crash the kernel if an arbitrary "alg" is incompatible and not intended to be used with mcryptd. It is an issue if AF_ALG trie