From 494688efdc5912b858d0a05563c9cf258c75d29a Mon Sep 17 00:00:00 2001 From: "GONG, Ruiqi" Date: Wed, 18 May 2022 09:21:37 +0000 Subject: 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 Signed-off-by: Paul Moore --- security/selinux/include/avc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'security/selinux') 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 -- cgit v1.2.3