summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorSven Van Asbroeck2019-06-17 20:23:54 +0200
committerGreg Kroah-Hartman2019-06-18 09:10:02 +0200
commit2472d64af2d3561954e2f05365a67692bb852f2a (patch)
tree970ea3d44d0f259e58f629d49b419c91a365139f /virt
parentARM: omap1: remove unused variable (diff)
downloadkernel-qcow2-linux-2472d64af2d3561954e2f05365a67692bb852f2a.tar.gz
kernel-qcow2-linux-2472d64af2d3561954e2f05365a67692bb852f2a.tar.xz
kernel-qcow2-linux-2472d64af2d3561954e2f05365a67692bb852f2a.zip
firmware: improve LSM/IMA security behaviour
The firmware loader queries if LSM/IMA permits it to load firmware via the sysfs fallback. Unfortunately, the code does the opposite: it expressly permits sysfs fw loading if security_kernel_load_data( LOADING_FIRMWARE) returns -EACCES. This happens because a zero-on-success return value is cast to a bool that's true on success. Fix the return value handling so we get the correct behaviour. Fixes: 6e852651f28e ("firmware: add call to LSM hook before firmware sysfs fallback") Cc: Stable <stable@vger.kernel.org> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Kees Cook <keescook@chromium.org> To: Luis Chamberlain <mcgrof@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com> Reviewed-by: Mimi Zohar <zohar@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions