Commit e8d9fab3 authored by David Gstir's avatar David Gstir Committed by Jarkko Sakkinen
Browse files

KEYS: trusted: dcp: fix improper sg use with CONFIG_VMAP_STACK=y



With vmalloc stack addresses enabled (CONFIG_VMAP_STACK=y) DCP trusted
keys can crash during en- and decryption of the blob encryption key via
the DCP crypto driver. This is caused by improperly using sg_init_one()
with vmalloc'd stack buffers (plain_key_blob).

Fix this by always using kmalloc() for buffers we give to the DCP crypto
driver.

Cc: stable@vger.kernel.org # v6.10+
Fixes: 0e28bf61 ("KEYS: trusted: dcp: fix leak of blob encryption key")
Signed-off-by: default avatarDavid Gstir <david@sigma-star.at>
Reviewed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent 5f56d41a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment