From: Heinrich Schuchardt Date: Fri, 10 Jun 2016 21:34:26 +0000 (+0200) Subject: apparmor: do not expose kernel stack X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=f4ee2def2d70692ccff0d55353df4ee594fd0017;p=deliverable%2Flinux.git apparmor: do not expose kernel stack Do not copy uninitalized fields th.td_hilen, th.td_data. Signed-off-by: Heinrich Schuchardt Signed-off-by: John Johansen --- 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) 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);