Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1066251ybl; Wed, 14 Aug 2019 10:09:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7e/jk4sMkeCg+GIMt9Q0UY1tTwTIPdvQztALLWhTmBlcP+XG4/N5k622V1fQfQmlW+i2F X-Received: by 2002:a17:902:f46:: with SMTP id 64mr386773ply.235.1565802579244; Wed, 14 Aug 2019 10:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802579; cv=none; d=google.com; s=arc-20160816; b=1LxhTRMJSBNl/+8iX8QsxdbdwaA/bsjg1ZsaeAWlikfEzk9dDQqsoyncd7HoKS4Xqk bmQVqPjX/QLwmpBnS/rJs9vxlxOjYuxLqLmzNINsDgtSKO2amq1tlwYqALxJgstFlj15 sVZK9G62U7I1tPRFnTQTWp4xWOQZBbTP+YiAvvBoQ+n3G2EuuAaqTmEOG8gBUI7kG+gx z8GAqA5qgBPVZlHaXCAI877K5OI9j/FUxd30fz67bj4tYgck669/ZJXB8dB8HPvuSHts vbSav9yQaH3Mt74Z8o43rlcHLIAzxvmiuULaG9Tn3YQpo/UOcPvEq+dAEtcVAybkwYWD 7pCA== 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=tDLwGd+IQ2cJthP8SbJdeIOIYcZ71EidNFcJ6lLShNw=; b=rFl0Luc9XpM9e5qifUiuoeqnnlzpffmH1H0EXJlOHncQ6rk7oS9/Or8qSNocDIXkFw CAFG3tbSmcnGyegmcDVdi1fDU2cvIMXB/sRr9UPzwmUJX4Mi2qj7pCJe7GIDt+O7c/YE SybjR2+xeLXY+stXUOE51Wqda8Ext6pRCecZOgno5HiR8cbnUVK3ARB4UXfB6AIUHAVp M6NxsGaqzqzU5/xq48TisAHWZ6i5bJETeh7K/+KD9YiKVFIaj8L8TI/+9U3ObsHCt+7d 8aijp9vsNo+d/ZJ/ealUxrmxEmIc/TbAB4qNOoufgUIVFcyrKheuvGXxHLhZvHgG6arr 8G9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KZxGlhp8; 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 y1si160345pgg.490.2019.08.14.10.09.22; Wed, 14 Aug 2019 10:09:39 -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=KZxGlhp8; 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 S1730113AbfHNRIS (ORCPT + 99 others); Wed, 14 Aug 2019 13:08:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:58200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730102AbfHNRIQ (ORCPT ); Wed, 14 Aug 2019 13:08:16 -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 3E8ED214DA; Wed, 14 Aug 2019 17:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802495; bh=8kfYVqb2NIlKpHyB9OJtszlE9DT2CdhMlAunHr6PX7E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KZxGlhp8FF3+X8dENU+OrA8Kmb/mUYcJdOoev/FenMAU243CJXZW9S1G81jDf8bk1 sLcYDpDvdu5+dd22qHonP5B+iqqWEELM7Y5keIWjXkPFHStRKPC97Jvid1eUcjreZS 8r0VjVFaTQ6Gu2HzeOY60KIj9RXhOsDkshmrz2Vg= 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 5.2 122/144] can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices Date: Wed, 14 Aug 2019 19:01:18 +0200 Message-Id: <20190814165805.033851424@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@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 @@ -841,7 +841,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;