Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1066199ybl; Wed, 14 Aug 2019 10:09:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHEj2Je1bejc7ppjl8jbM8zzRv7plWHFO2Rqe5X54aoMJ3dm53MGN10YiFYeamgpx9yl5x X-Received: by 2002:a62:1b0c:: with SMTP id b12mr965397pfb.17.1565802576842; Wed, 14 Aug 2019 10:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802576; cv=none; d=google.com; s=arc-20160816; b=D7q3zN5uDKePMAgmLpkVHHrJPMX2t3u/bLj0ZRKRwZIK7ZM7M+ctSm279ymssUoogi ANfPX3quoSZFp7wD1ptA8sppUJA2dF6thdFAmo1N4Q8yU5WCooA3Z7BzyftMz/9cNusU lthaMiCuZtg68ugEtFJwcjhhs83E8pyAhXNrqmaRhwfejwGhahv4zREw+OySeeQ9KoJM wrWKQsIrS64yrWlMiT6ZUSJhfv6tdvJgDRtfQCWqJSm0tnB8kKCUX5u3Ge939N1hIOWw eHnnB2p/MRphE4dWVGuoRzaSiO4ASKERkS7K4HOVlUeAbe1epJupF2xe5shM/+9dFOqG IN4w== 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=Ppr5yu57AhHoELOnw5poFFTnbnEwmrribqR8Cri528M=; b=oXL/hUpn0CgCycxm3x0qjQfFJXQqZ7GUgxS4XR4GdtmFkjoe9RWBrL8PAvhO8ToVHi FseE5U0caxaIbvI0ZWzadP2zc3d9OeCRqBseUQfRw2kvarzsbjga6h+J/jzWtqXaw5fA mkwXFQ/AQWy9mkgTv8rp31h344BDHFSyI4Y3oYcTBYnJ30sfJQiWLfgQd6wqbFNJS4Wa s9FaiQYWxGc9empuJdzTl9CzJaZgwDUuOejhUzK27SuiDN9vjzjZlfiXxqzDPo3st8PU YXKOIcWrLwSjLcAbblg6vlUFtCQ4asvzspjkpiLVB6XP7dmxYDYAiEqfklBU7vKPbOep /xDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NUCrV0Ew; 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 o37si186861pjb.94.2019.08.14.10.09.21; Wed, 14 Aug 2019 10:09:36 -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=NUCrV0Ew; 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 S1730099AbfHNRIP (ORCPT + 99 others); Wed, 14 Aug 2019 13:08:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:58128 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729045AbfHNRIN (ORCPT ); Wed, 14 Aug 2019 13:08:13 -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 AF3D7216F4; Wed, 14 Aug 2019 17:08:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802493; bh=X2uMXTHGNhPxf1CI+iyWVQOr8M90YXHMvOG9H+Ly1Uo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NUCrV0EwJtzmuxic9PT2cxj8bxqUuQlcgGNJygqYGHRsWWtFzRKGp7WozmK1WOkAc T3TFMsPdr9oUigHpCvFM6cGa1tEZwgNWrTdvdO1l7nOb0dS+OFUeriI1YZ3/U9dUNf NtesYL06BCQngObU1YZcJKEp9Vx0VeLR3CIWZ3sA= 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 5.2 121/144] can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices Date: Wed, 14 Aug 2019 19:01:17 +0200 Message-Id: <20190814165804.990792548@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 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 @@ -494,7 +494,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;