Thread (41 messages) 41 messages, 7 authors, 2018-06-06

[PATCH v4a 8/8] module: replace the existing LSM hook in init_module

From: Kees Cook <hidden>
Date: 2018-06-05 22:26:37
Also in: kexec, linux-integrity, lkml

On Tue, Jun 5, 2018 at 2:35 PM, Mimi Zohar [off-list ref] wrote:
On Tue, 2018-06-05 at 12:45 -0700, Kees Cook wrote:
quoted
And if you must have a separate enum, please change this to fail
closed instead of open (and mark the fall-through):

int rc = -EPERM;

switch (id) {
case LOADING_MODULE:
    rc = loadpin_read_file(NULL, READING_MODULE);
    /* Fall-through */
default:
    break;
}
This will fail the sysfs firmware fallback loading and the kexec_load
syscall without any message, as you have for init_module.  Is that
what you want?
I'd prefer there be a full mapping of the enums so that everything
gets passed into loadpin_read_file() :)

Can the enum be shared or is that nonsensical?

-Kees

-- 
Kees Cook
Pixel Security
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help