Skip to contentSkip to conversation

ro hardening for the security subsystem

RFC PATCH In review James Morris 2 participants 2 messages Feb 13, 2017

lore
Share & tools
lore
#0 lore raw

cover ro hardening for the security subsystem

Hi Folks,

Please review/test these patches which add some read-only hardening to the security subsystem.

In this series, the following are marked as __ro_after_init:

- LSM hooks
- Netfilter hooks used by security/
- the default IMA rules

I've also constified the SELinux Netlink permission tables, which will ensure they're located in an RO section.

---

James Morris (4):
security: mark LSM hooks as __ro_after_init
security: mark nf ops in SELinux and Smack as __ro_after_init
integrity: mark default IMA rules as __ro_after_init
selinux: constify nlmsg permission tables

 security/apparmor/lsm.c             |    2 +-
 security/commoncap.c                |    2 +-
 security/integrity/ima/ima_policy.c |    8 ++++----
 security/loadpin/loadpin.c          |    2 +-
 security/security.c                 |    2 +-
 security/selinux/hooks.c            |    4 ++--
 security/selinux/nlmsgtab.c         |   10 +++++-----
 security/smack/smack_lsm.c          |    2 +-
 security/smack/smack_netfilter.c    |    2 +-
 security/tomoyo/tomoyo.c            |    2 +-
 security/yama/yama_lsm.c            |    2 +-
 11 files changed, 19 insertions(+), 19 deletions(-)
Signature · 2 lines
James Morris
<[email protected]>
Acked-by on the v1 series
#1 lore raw
Quoted 5 lines · James Morris

Hi Folks,

Please review/test these patches which add some read-only hardening to the security subsystem.

Quoted 8 lines

In this series, the following are marked as __ro_after_init:

- LSM hooks
- Netfilter hooks used by security/
- the default IMA rules

I've also constified the SELinux Netlink permission tables, which will ensure they're located in an RO section.

A lot of the security subsystem is targeted during kernel write exploits, so I think this is very nice change to have. Thanks for doing this!

-Kees

Signature · 2 lines
Kees Cook
Pixel Security