Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1076381ybl; Wed, 14 Aug 2019 10:18:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsxh8vjNr+j2XLplPYSZ3RFd5ajxH64CGbpP+Z8yW+0yqg3BgWJ3VPZzCkXs2uScFZ/4L6 X-Received: by 2002:a65:43c2:: with SMTP id n2mr244236pgp.110.1565803117484; Wed, 14 Aug 2019 10:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803117; cv=none; d=google.com; s=arc-20160816; b=0wVviFIX8/2iG5vJucKbma7t3RaLyFMuDwwle88uIPSxMrMDP1+NI/t+hhAHCK4X8H Ybb5zOJyxSjQalzifm4QZxmC4LZQSqAssOUzzL/zN96JhgLao8wDTxj5r05nR/A/E0KE 03+tiXE5BlTs/bcWvS1+TPBqj1QnPKw9MpGxiCsAebWEBiIyhIjWq9C/7Gv00vqXNRvA Gt2Zl0W+/Uo8VGQ3LwCdPojHgEdZOg5UKGv2NSijw/I9HEHcqoM84Hl9qptbft4lgPO+ ETxIAyjDZFdQ/bpGXyCExZcMO9h9qMg80zmLjgULJTTdSqrtzaK94PF2KtzFeBctRLZc ULrg== 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=Iph4X8HUv2HwJXszBDveQJI2+ilTKockEFfK0ftajYI=; b=Au+L+fX8tAeefJaMzCJotxAzMqfBLKF/qmvF6B5bXscw9uvUAEguEA/R49qYxxVZSX pEC9YC7e9sDkmJZuEttBYNn33LdH8AEHZr3qAyEnR98IMj1TsLvx3baBw+BKMScG3Orr jiQJXw3z84WaLWE7jqcANizDyMjetym4osDeSRAANiYRETJIXVlsVrP9lcD+dRPvNTup prl3+7RTwlzbxHugKOaGM35khzNGtgoHKxkbYE95AhtWCKwKUlGu6uuBslhSHEOO5uGS 8pxUL/zFfMhUbludBEdz+lIHTUMaBok0qT1T1/HHWr5tYkWoDk0m9frbGAT1U6v0fEuF TC2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m+2qbvR5; 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 c6si238216plo.263.2019.08.14.10.18.21; Wed, 14 Aug 2019 10:18:37 -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=m+2qbvR5; 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 S1729677AbfHNRQd (ORCPT + 99 others); Wed, 14 Aug 2019 13:16:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:38740 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731049AbfHNROQ (ORCPT ); Wed, 14 Aug 2019 13:14: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 A163821721; Wed, 14 Aug 2019 17:14:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802856; bh=haDGDPpQ1Pj1EGxaFFI0G/sBZ/fd/kn1SmnmBMF/z+U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m+2qbvR50GlQ5guh8a/P3y5Vgz/SpgPhWwCrlsZLwyXfdaqjYY61hx8Ti7TgnlBUJ RrVr1Xpvq2A7EYI4pZAzLe4RXtB0QJxsge8hPzsabKySERhnao2MwYVEQb4PPT7YDJ Oe3h9bHDMxx2d6cpwL1MK6tiICuGPunxJ5Hq6ulw= 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.14 53/69] can: peak_usb: pcan_usb_fd: Fix info-leaks to USB devices Date: Wed, 14 Aug 2019 19:01:51 +0200 Message-Id: <20190814165749.050344988@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 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 @@ -852,7 +852,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;