Thread (26 messages) 26 messages, 5 authors, 2022-02-14

Re: [PATCH v5 6/6] module: Move duplicate mod_check_sig users code to mod_parse_sig

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2022-01-25 20:27:17
Also in: kexec, keyrings, linux-crypto, linux-integrity, linux-s390, linux-security-module, lkml

On Tue, Jan 11, 2022 at 12:37:48PM +0100, Michal Suchanek wrote:
Multiple users of mod_check_sig check for the marker, then call
mod_check_sig, extract signature length, and remove the signature.

Put this code in one place together with mod_check_sig.

This changes the error from ENOENT to ENODATA for ima_read_modsig in the
case the signature marker is missing.

This also changes the buffer length in ima_read_modsig from size_t to
unsigned long. This reduces the possible value range on 32bit but the
length refers to kernel in-memory buffer which cannot be longer than
ULONG_MAX.

Also change mod_check_sig to unsigned long while at it.

Signed-off-by: Michal Suchanek <redacted>
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help