Skip to content

Commit

Permalink
apparmor: do not expose kernel stack
Browse files Browse the repository at this point in the history
commit f4ee2de upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
  • Loading branch information
Heinrich Schuchardt authored and Jiri Slaby committed Jan 27, 2017
1 parent a5d852b commit c0b039e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion security/apparmor/match.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ static struct table_header *unpack_table(char *blob, size_t bsize)

table = kvzalloc(tsize);
if (table) {
*table = th;
table->td_id = th.td_id;
table->td_flags = th.td_flags;
table->td_lolen = th.td_lolen;
if (th.td_flags == YYTD_DATA8)
UNPACK_ARRAY(table->td_data, blob, th.td_lolen,
u8, byte_to_byte);
Expand Down

0 comments on commit c0b039e

Please sign in to comment.