summaryrefslogtreecommitdiff
path: root/security/selinux
diff options
context:
space:
mode:
authorGONG, Ruiqi <gongruiqi1@huawei.com>2022-05-18 09:21:37 +0000
committerPaul Moore <paul@paul-moore.com>2022-06-07 16:03:21 -0400
commit494688efdc5912b858d0a05563c9cf258c75d29a (patch)
tree28070bd80c016a59520c10de0955a50eb29614f7 /security/selinux
parentf2906aa863381afb0015a9eb7fefad885d4e5a56 (diff)
selinux: add __randomize_layout to selinux_audit_data
Randomize the layout of struct selinux_audit_data as suggested in [1], since it contains a pointer to struct selinux_state, an already randomized strucure. [1]: https://github.com/KSPP/linux/issues/188 Signed-off-by: GONG, Ruiqi <gongruiqi1@huawei.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/include/avc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/include/avc.h b/security/selinux/include/avc.h
index 2b372f98f2d7..5525b94fd266 100644
--- a/security/selinux/include/avc.h
+++ b/security/selinux/include/avc.h
@@ -53,7 +53,7 @@ struct selinux_audit_data {
u32 denied;
int result;
struct selinux_state *state;
-};
+} __randomize_layout;
/*
* AVC operations