Skip to content

RFC Add mechanism to write protect all unloadable security modules

Sargun Dhillon linux-security-module 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2security: convert security hooks to use hlistinclude/linux/lsm_hooks.h security/security.c+225 -2250 replies
2/2security: Add mechanism to (un)load LSMs after boot timeinclude/linux/lsm_hooks.h security/apparmor/lsm.c security/commoncap.c +5 more+92 -191 reply
2/2security: Add mechanism to (un)load LSMs after boot time+0 -03 replies
2/2security: Add mechanism to (un)load LSMs after boot time+0 -01 reply
2/2security: Add mechanism to (un)load LSMs after boot time+0 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] Add mechanism to write protect all unloadable security modules

This patchset consists of three features:
1) Not using a circular list for security hook heads.
This has the benefit of allowing us to remove hooks at the tail of the chain, without interfering with the head. In turn, this allows us to always mark the head as read-only.

This also saves space, as there is only one pointer, not two.

2) Adding an intermediate set of mutable hooks.
In the linked-list of hooks, there will be the:
head->write protected hooks->noop mutable hook->mutable hooks

This intermediate hook makes it so that we can prevent built-in LSMs from being modified.

3) Making it so you can load modules after boot time.

Sargun Dhillon (2):
security: convert security hooks to use hlist
security: Add mechanism to (un)load LSMs after boot time

 include/linux/lsm_hooks.h  | 435 +++++++++++++++++++++++----------------------
 security/apparmor/lsm.c    |   2 +-
 security/commoncap.c       |   2 +-
 security/security.c        | 105 +++++++++--
 security/selinux/hooks.c   |   5 +-
 security/smack/smack_lsm.c |   3 +-
 security/tomoyo/tomoyo.c   |   3 +-
 security/yama/yama_lsm.c   |   2 +-
 8 files changed, 315 insertions(+), 242 deletions(-)
Signature · 6 lines
2.14.1

--
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