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>
This commit is contained in:
GONG, Ruiqi 2022-05-18 09:21:37 +00:00 committed by Paul Moore
parent f2906aa863
commit 494688efdc
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ struct selinux_audit_data {
u32 denied;
int result;
struct selinux_state *state;
};
} __randomize_layout;
/*
* AVC operations