Skip to content

Commit

Permalink
selinux: add __randomize_layout to selinux_audit_data
Browse files Browse the repository at this point in the history
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]: KSPP/linux#188

Signed-off-by: GONG, Ruiqi <gongruiqi1@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
GONG, Ruiqi authored and Aarqw12 committed Jan 20, 2024
1 parent 1e987ec commit 9e89d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/include/avc.h
Expand Up @@ -53,7 +53,7 @@ struct selinux_audit_data {
u32 denied;
int result;
struct selinux_state *state;
};
} __randomize_layout;

/*
* AVC operations
Expand Down

0 comments on commit 9e89d43

Please sign in to comment.