aboutsummaryrefslogtreecommitdiff
path: root/security/apparmor
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2016-06-10 23:34:26 +0200
committerMister Oyster <oysterized@gmail.com>2017-07-04 11:51:27 +0200
commit91bb85fcdbe302e0412f32c05331e7d8f6e1b3e0 (patch)
tree4856af97449481d1c96925ed39394177db714263 /security/apparmor
parent66205a5891ee4cf555db5c3d86bc2257037b127b (diff)
apparmor: do not expose kernel stack
commit f4ee2def2d70692ccff0d55353df4ee594fd0017 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> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/match.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/security/apparmor/match.c b/security/apparmor/match.c
index 10d824bc3..704b0eb25 100644
--- a/security/apparmor/match.c
+++ b/security/apparmor/match.c
@@ -61,7 +61,9 @@ static struct table_header *unpack_table(char *blob, size_t bsize)
table = kvmalloc(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);