diff options
| author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2016-06-10 23:34:26 +0200 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-07-04 11:51:27 +0200 |
| commit | 91bb85fcdbe302e0412f32c05331e7d8f6e1b3e0 (patch) | |
| tree | 4856af97449481d1c96925ed39394177db714263 /security/apparmor/match.c | |
| parent | 66205a5891ee4cf555db5c3d86bc2257037b127b (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/match.c')
| -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 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); |
