Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753733AbdFSTE1 (ORCPT + 2 others); Mon, 19 Jun 2017 15:04:27 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:52494 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753603AbdFSShY (ORCPT ); Mon, 19 Jun 2017 14:37:24 -0400 From: Willy Tarreau To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux@roeck-us.net Cc: Heinrich Schuchardt , John Johansen , Jiri Slaby , Willy Tarreau Subject: [PATCH 3.10 121/268] apparmor: do not expose kernel stack Date: Mon, 19 Jun 2017 20:30:20 +0200 Message-Id: <1497897167-14556-122-git-send-email-w@1wt.eu> X-Mailer: git-send-email 2.8.0.rc2.1.gbe9624a In-Reply-To: <1497897167-14556-1-git-send-email-w@1wt.eu> References: <1497897167-14556-1-git-send-email-w@1wt.eu> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: From: Heinrich Schuchardt commit f4ee2def2d70692ccff0d55353df4ee594fd0017 upstream. Do not copy uninitalized fields th.td_hilen, th.td_data. Signed-off-by: Heinrich Schuchardt Signed-off-by: John Johansen Signed-off-by: Jiri Slaby Signed-off-by: Willy Tarreau --- security/apparmor/match.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/security/apparmor/match.c b/security/apparmor/match.c index 10d824b..704b0eb 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); -- 2.8.0.rc2.1.gbe9624a