diff options
author | Kees Cook <keescook@chromium.org> | 2017-05-26 00:40:22 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-06-22 19:21:42 -0400 |
commit | 802762cdfff256b6bf3fdb624ac2c56ec043c4f0 (patch) | |
tree | 4a05dac3288791da1aefc191f6fe8da1e2e0c56e /scripts | |
parent | b07b65846ba33a4deba03eb6e39043c8bc70903b (diff) |
randstruct: Whitelist big_key path struct overloading
The big_key payload structure intentionally stores a struct path in
two void pointers to avoid header soup. Whitelist this case:
security/keys/big_key.c: In function ‘big_key_read’:
security/keys/big_key.c:293:16: note: found mismatched rhs struct pointer types: ‘struct path’ and ‘void *’
struct path *path = (struct path *)&key->payload.data[big_key_path];
^~~~
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/gcc-plugins/randomize_layout_plugin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/randomize_layout_plugin.c b/scripts/gcc-plugins/randomize_layout_plugin.c index 2e710bf29699..c07818dac401 100644 --- a/scripts/gcc-plugins/randomize_layout_plugin.c +++ b/scripts/gcc-plugins/randomize_layout_plugin.c | |||
@@ -48,6 +48,8 @@ struct whitelist_entry { | |||
48 | static const struct whitelist_entry whitelist[] = { | 48 | static const struct whitelist_entry whitelist[] = { |
49 | /* unix_skb_parms via UNIXCB() buffer */ | 49 | /* unix_skb_parms via UNIXCB() buffer */ |
50 | { "net/unix/af_unix.c", "unix_skb_parms", "char" }, | 50 | { "net/unix/af_unix.c", "unix_skb_parms", "char" }, |
51 | /* big_key payload.data struct splashing */ | ||
52 | { "security/keys/big_key.c", "path", "void *" }, | ||
51 | /* walk struct security_hook_heads as an array of struct list_head */ | 53 | /* walk struct security_hook_heads as an array of struct list_head */ |
52 | { "security/security.c", "list_head", "security_hook_heads" }, | 54 | { "security/security.c", "list_head", "security_hook_heads" }, |
53 | { } | 55 | { } |