CONFIG_MODULE_SIG_FORCE can make tests fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
New
|
Undecided
|
Unassigned |
Bug Description
Issue found on kernel with CONFIG_
The following tests will fail:
* ubuntu_
- fw_load ('insmod' exited with a non-zero code 1 at tst_cmd.c:121)
- block_dev ('insmod' exited with a non-zero code 1 at tst_cmd.c:121)
- tpci ('insmod' exited with a non-zero code 1 at tst_cmd.c:121)
- ltp_acpi ('insmod' exited with a non-zero code 1 at tst_cmd.c:121)
- uaccess ('insmod' exited with a non-zero code 1 at tst_cmd.c:121)
* ubuntu_
- insmod01_sh (insmod: ERROR: could not insert module ltp_insmod01.ko: Key was rejected by service)
* ubuntu_ltp_syscalls
- delete_module01 (insmod: ERROR: could not insert module dummy_del_mod.ko: Key was rejected by service)
- delete_module03 (insmod: ERROR: could not insert module dummy_del_mod.ko: Key was rejected by service)
- finit_module01 (TFAIL: finit_module(fd, "status=valid", 0) failed: EKEYREJECTED (129))
- finit_module02 (insmod: ERROR: could not insert module /opt/ltp/
- init_module01 (TFAIL: init_module(buf, sb.st_size, "status=valid") failed: EKEYREJECTED (129))
- init_module02 (insmod: ERROR: could not insert module init_module.ko: Key was rejected by service)
* ubuntu_
- lttng-smoke-test (Error: Event sched_switch: Kernel tracer not available (channel channel0, session test-kernel-
* ubuntu_
- KernelSecurityT
Note that for the ubuntu_ltp_syscalls tests failure, they just check the /proc/cmdline to see if the module.sig_enforce was added there. As we don't have it in /proc/cmdline, it's expecting the test to pass.
I think azure-fde is affected as well.
It's better to add corresponding config check, and prints an user-friendly error message to make reviewers' life easier.
Related branches
- Alex Murray (community): Approve
-
Diff: 18 lines (+7/-0)1 file modifiedscripts/test-kernel-security.py (+7/-0)
For LTP syscalls - https:/ /lists. linux.it/ pipermail/ ltp/2024- December/ 041355. html