Skip to content
Commit 5c7bac9f authored by Lakshmi Ramasubramanian's avatar Lakshmi Ramasubramanian Committed by Mimi Zohar
Browse files

IMA: pre-allocate buffer to hold keyrings string



ima_match_keyring() is called while holding rcu read lock. Since this
function executes in atomic context, it should not call any function
that can sleep (such as kstrdup()).

This patch pre-allocates a buffer to hold the keyrings string read from
the IMA policy and uses that to match the given keyring.

Signed-off-by: default avatarLakshmi Ramasubramanian <nramas@linux.microsoft.com>
Fixes: e9085e0a ("IMA: Add support to limit measuring keys")
Signed-off-by: default avatarMimi Zohar <zohar@linux.ibm.com>
parent 483ec26e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment