diff options
| author | Sven Van Asbroeck <[email protected]> | 2019-06-17 18:23:54 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2019-06-18 07:10:02 +0000 |
| commit | 2472d64af2d3561954e2f05365a67692bb852f2a (patch) | |
| tree | 970ea3d44d0f259e58f629d49b419c91a365139f /lib/fault-inject.c | |
| parent | ARM: omap1: remove unused variable (diff) | |
| download | kernel-2472d64af2d3561954e2f05365a67692bb852f2a.tar.gz kernel-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 <[email protected]>
Cc: Mimi Zohar <[email protected]>
Cc: Kees Cook <[email protected]>
To: Luis Chamberlain <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: [email protected]
Signed-off-by: Sven Van Asbroeck <[email protected]>
Reviewed-by: Mimi Zohar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/fault-inject.c')
0 files changed, 0 insertions, 0 deletions
