Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1074007ybl; Wed, 14 Aug 2019 10:16:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbomcnW0rtoU+fHFCdfD35gXuh1SM7/huxQ9wcthq+7Rq71JGXmX/X30b11NG7StJXygfD X-Received: by 2002:a17:902:bb8e:: with SMTP id m14mr428040pls.107.1565802982769; Wed, 14 Aug 2019 10:16:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802982; cv=none; d=google.com; s=arc-20160816; b=AkHJFHwFN58w74mWQeAWFdued4q7Qy0UkkWrMstu2QykJul7pIY4NARD2uPdSDbsGf 7LzDWt7Tf3MB0xW7bd+eDvN0X5NUQZN8y09sDTZlVRNBdTw/0flfhSH3T7Mqb3FGBGC8 2sLlk8zkOHXBBJScLdg9+xyo/bs+lmEPxhw3O4Te+zFGVJrshuOec4CO+z+7Qmf4Zzic zoo6haJt8H+F1IEJ4HXIleCLnCTohTImXSdiUSO2lKWp6WoUIkbnkTG9GkvDxH4kEiO+ CafKfScittz82856La0Xwkbd8RuO9aVtZM+6M4UgmiK0befP2GNa64G0IFpM/HfKWBGh Jjzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nxILAL5lJzt7GbnR5gsquoEfhrxHepcEHRA3TH49TaE=; b=pYIzRfqSflfrDsONqGZ82yJ0Imoaa2TdM2ULCYrf00oJ3JcSmB1AHrwW2lkUNa56Xn 7qs4JRtYUOHsmxlIt1Pr+0aUr92J77Bq5fFyBMhyekFSo2vlCKzB4svg9H2OWlGaoa5Y bks6iM/M2Pg77Q2HBXtmtKrv7baa4nuC4iy+J1pZrvdX3qDE+XfwGTzIn7Tw1A9yyt0i K+U+CF7foJgsTYf2t/ytE3phTLERsH5+J9Bz9p1fUHLChWHjGQV4tOxSFkzWbxt8FDrW 3DCwOJD+FASLCUCq2xCw+W1Es96mn5rvJAqd95vyPu31uOP4ap22w3jmvenS55EGgS8M jnzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EHC3Wa+T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y63si167950pgd.403.2019.08.14.10.16.07; Wed, 14 Aug 2019 10:16:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EHC3Wa+T; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731053AbfHNROR (ORCPT + 99 others); Wed, 14 Aug 2019 13:14:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:38698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731038AbfHNROO (ORCPT ); Wed, 14 Aug 2019 13:14:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1CCF62084D; Wed, 14 Aug 2019 17:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802853; bh=Qxmb6vn3g3QEs2Y31wCulIpv1Hya/mij5H+crVxaM88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EHC3Wa+T57ba0CnRsEa+eahM0T0ONgixcwBgYy5DJZQc0CmI5Mx47k3Ed9itIOh6e w38N+N0nhJgd4irFPqgR+vFCyM7Lvg/C3d5XJqqmRdsBLT77ogGxJTd/sqbgPZPCLE qAAe7tln71Cfyp1EV8mUtcmJ8Cq3UTcSGWPOB6js= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomas Bortoli , syzbot+d6a5a1a3657b596ef132@syzkaller.appspotmail.com, Marc Kleine-Budde Subject: [PATCH 4.14 52/69] can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices Date: Wed, 14 Aug 2019 19:01:50 +0200 Message-Id: <20190814165749.015597775@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165744.822314328@linuxfoundation.org> References: <20190814165744.822314328@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomas Bortoli commit ead16e53c2f0ed946d82d4037c630e2f60f4ab69 upstream. Uninitialized Kernel memory can leak to USB devices. Fix by using kzalloc() instead of kmalloc() on the affected buffers. Signed-off-by: Tomas Bortoli Reported-by: syzbot+d6a5a1a3657b596ef132@syzkaller.appspotmail.com Fixes: f14e22435a27 ("net: can: peak_usb: Do not do dma on the stack") Cc: linux-stable Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c @@ -500,7 +500,7 @@ static int pcan_usb_pro_drv_loaded(struc u8 *buffer; int err; - buffer = kmalloc(PCAN_USBPRO_FCT_DRVLD_REQ_LEN, GFP_KERNEL); + buffer = kzalloc(PCAN_USBPRO_FCT_DRVLD_REQ_LEN, GFP_KERNEL); if (!buffer) return -ENOMEM;