diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2016-06-10 17:34:26 -0400 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2016-07-12 11:43:10 -0400 |
commit | f4ee2def2d70692ccff0d55353df4ee594fd0017 (patch) | |
tree | 2fbd3f9b7e6d393bb2957a0d3889e33619268fb3 /security | |
parent | 58acf9d911c8831156634a44d0b022d683e1e50c (diff) |
apparmor: do not expose kernel stack
Do not copy uninitalized fields th.td_hilen, th.td_data.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/match.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/apparmor/match.c b/security/apparmor/match.c index 32b72eb3d988..3f900fcca8fb 100644 --- a/security/apparmor/match.c +++ b/security/apparmor/match.c | |||
@@ -63,7 +63,9 @@ static struct table_header *unpack_table(char *blob, size_t bsize) | |||
63 | 63 | ||
64 | table = kvzalloc(tsize); | 64 | table = kvzalloc(tsize); |
65 | if (table) { | 65 | if (table) { |
66 | *table = th; | 66 | table->td_id = th.td_id; |
67 | table->td_flags = th.td_flags; | ||
68 | table->td_lolen = th.td_lolen; | ||
67 | if (th.td_flags == YYTD_DATA8) | 69 | if (th.td_flags == YYTD_DATA8) |
68 | UNPACK_ARRAY(table->td_data, blob, th.td_lolen, | 70 | UNPACK_ARRAY(table->td_data, blob, th.td_lolen, |
69 | u8, byte_to_byte); | 71 | u8, byte_to_byte); |