Re: [PATCH] KEYS: reject NULL restriction string when type is specified

2017-12-08 Thread Mat Martineau
On Fri, 8 Dec 2017, David Howells wrote: Mat Martineau wrote: Since this fixes the bug for the asymmetric key type and ensures that other key types won't make the same mistake, I agree this is the way to fix it. I did not find any issues in the patch. Can I put that down as a Reviewed-by?

Re: [PATCH] KEYS: reject NULL restriction string when type is specified

2017-12-08 Thread David Howells
Mat Martineau wrote: > Since this fixes the bug for the asymmetric key type and ensures that other > key types won't make the same mistake, I agree this is the way to fix it. I > did not find any issues in the patch. Can I put that down as a Reviewed-by? David

Re: [PATCH] KEYS: reject NULL restriction string when type is specified

2017-11-30 Thread Mat Martineau
Eric, On Thu, 30 Nov 2017, Eric Biggers wrote: From: Eric Biggers keyctl_restrict_keyring() allows through a NULL restriction when the "type" is non-NULL, which causes a NULL pointer dereference in asymmetric_lookup_restriction() when it calls strcmp() on the restriction string. But no key

[PATCH] KEYS: reject NULL restriction string when type is specified

2017-11-30 Thread Eric Biggers
From: Eric Biggers keyctl_restrict_keyring() allows through a NULL restriction when the "type" is non-NULL, which causes a NULL pointer dereference in asymmetric_lookup_restriction() when it calls strcmp() on the restriction string. But no key types actually use a "NULL restriction" to mean anyt