Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753493AbdLGMst (ORCPT ); Thu, 7 Dec 2017 07:48:49 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:56800 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308AbdLGMsr (ORCPT ); Thu, 7 Dec 2017 07:48:47 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vlad Tsyrklevich , "David S. Miller" , Sasha Levin Subject: [PATCH 3.18 11/26] net/appletalk: Fix kernel memory disclosure Date: Thu, 7 Dec 2017 13:48:24 +0100 Message-Id: <20171207124656.149777395@linuxfoundation.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171207124654.669583826@linuxfoundation.org> References: <20171207124654.669583826@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1119 Lines: 34 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vlad Tsyrklevich [ Upstream commit ce7e40c432ba84da104438f6799d460a4cad41bc ] ipddp_route structs contain alignment padding so kernel heap memory is leaked when they are copied to user space in ipddp_ioctl(SIOCFINDIPDDPRT). Change kmalloc() to kzalloc() to clear that memory. Signed-off-by: Vlad Tsyrklevich Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/appletalk/ipddp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c @@ -191,7 +191,7 @@ static netdev_tx_t ipddp_xmit(struct sk_ */ static int ipddp_create(struct ipddp_route *new_rt) { - struct ipddp_route *rt = kmalloc(sizeof(*rt), GFP_KERNEL); + struct ipddp_route *rt = kzalloc(sizeof(*rt), GFP_KERNEL); if (rt == NULL) return -ENOMEM;