Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1078474ybl; Wed, 14 Aug 2019 10:20:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqwHa7jONCz68gbdgT8AwsO2bqgwjw5Prgv+vt6cWIY53fuomXjkhIN6A2A45kO1M2w7PbhG X-Received: by 2002:a63:36cc:: with SMTP id d195mr210042pga.157.1565803233452; Wed, 14 Aug 2019 10:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803233; cv=none; d=google.com; s=arc-20160816; b=VF1QCwrNV5LqxquOEIh4hfxiJN1mJrl798cIdkL19T1oroKZ6Y061hPK5MyEUuufmb vslMiRufkXZAqYN7L5aJctZZnEm/5rKySDs10FWBWC8aRP9NTpFciFhI1G+BVaUTxtx6 KmVMF4dW74Hyx9EvMmuHuJ7qELVEpRlZi3qSR/0lUCh/NA6wj0vdeHGO9KU2H/sYdBHZ yC+i1jz8mAvz/LbKuNSJ/rpBVX12qnigEI1AdRl/1DkU36Xammsxd8aGPGpLmWjWBVjj /M+76NIziCwpOUODaNmeIcqA1Hp4FBA1uWCx4QCZzvY2+MwUfmS6p7ySUZLdBUJRU/Qo LD3A== 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=oU9wV3M5nX2m+5iJqXUdeNI5Dc+uOK4E0t7ai808gI0=; b=DQRajRYDJtUTQG563U4aQrNXZOU1utVflUPcbj1dxM0I2l/dhoBtlJsdVp1fdCAbaY Nnde0eqYByUma3uzKlzVSmO98FxidgKnjG8lX1p7uykC411dyGSJg3AB2O9WJekZmIll SfMjfHhInSsUSNOpBrS6808lB9kE/E1Y8/NHryQ+eWkQJWLbDAJl9bHaKf99Sm609xe3 Irx3D5s64iPjcr3e1cWRGVX+lgSXejbaCbE6CM5e2qw92al/LuVeif6RynWp4DN+5f2G BWRbKmUxq9/M75teMC0/vXR5xGWQeUQkRDJklMNidzHdIMzGIcXecBEfLHQPHit/LgF7 L0vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EqeAK8YW; 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 31si273013pld.65.2019.08.14.10.20.17; Wed, 14 Aug 2019 10:20:33 -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=EqeAK8YW; 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 S1730572AbfHNRLS (ORCPT + 99 others); Wed, 14 Aug 2019 13:11:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:34458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730550AbfHNRLP (ORCPT ); Wed, 14 Aug 2019 13:11:15 -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 5088D2084D; Wed, 14 Aug 2019 17:11:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802674; bh=grA0DKPcDc7MYAVJDW8d4ROjaO1sQWfzI1vw9zB0CNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EqeAK8YWNSG1tA//PLaSdUe1UfvwssCquHEwvagPSc4glWyOAi/WczPTtsNZmumM7 ydWCjxUM4PBL+pr4k7Xf8IZvEPcTYHAuHSLf/GLbSpYa70FteLT7dxDIbLuj1hxas3 ydhUZB5LW6DEa1PS2CxXz/boJ6Oq44nXK0Q6pzkE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomas Bortoli , syzbot+513e4d0985298538bf9b@syzkaller.appspotmail.com, Marc Kleine-Budde Subject: [PATCH 4.19 74/91] can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices Date: Wed, 14 Aug 2019 19:01:37 +0200 Message-Id: <20190814165752.911676897@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165748.991235624@linuxfoundation.org> References: <20190814165748.991235624@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 30a8beeb3042f49d0537b7050fd21b490166a3d9 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+513e4d0985298538bf9b@syzkaller.appspotmail.com Fixes: 0a25e1f4f185 ("can: peak_usb: add support for PEAK new CANFD USB adapters") Cc: linux-stable Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c @@ -849,7 +849,7 @@ static int pcan_usb_fd_init(struct peak_ goto err_out; /* allocate command buffer once for all for the interface */ - pdev->cmd_buffer_addr = kmalloc(PCAN_UFD_CMD_BUFFER_SIZE, + pdev->cmd_buffer_addr = kzalloc(PCAN_UFD_CMD_BUFFER_SIZE, GFP_KERNEL); if (!pdev->cmd_buffer_addr) goto err_out_1;