]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ima: fix freeing ongoing ahash_request
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 2 Jul 2019 08:00:41 +0000 (10:00 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 18:04:27 +0000 (19:04 +0100)
commit74a22e07aff049ed58b04f2448dab83a6dab6acc
treeb2f0a889d6dca333f5c780fe326a7e2bc4e22398
parent8b655b70c291353db4b30570aea0526ff9523167
ima: fix freeing ongoing ahash_request

BugLink: https://bugs.launchpad.net/bugs/1849576
[ Upstream commit 4ece3125f21b1d42b84896c5646dbf0e878464e1 ]

integrity_kernel_read() can fail in which case we forward to call
ahash_request_free() on a currently running request. We have to wait
for its completion before we can free the request.

This was observed by interrupting a "find / -type f -xdev -print0 | xargs -0
cat 1>/dev/null" with ctrl-c on an IMA enabled filesystem.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
security/integrity/ima/ima_crypto.c