Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1078634ybl; Wed, 14 Aug 2019 10:20:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrGBkkf3iYMh2Q3vl6jvvtcJwhzs5zLJNannMUDHH38sOBFJSusO/K9Ab8t3751XxJAoT2 X-Received: by 2002:a65:654d:: with SMTP id a13mr248167pgw.196.1565803245175; Wed, 14 Aug 2019 10:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803245; cv=none; d=google.com; s=arc-20160816; b=TQk8jEWLH6ZaLwNY7uBMvV8oKoxPKQVPIs1BzP4rj7B23ThrkzW3q2avSPe/vRSLAa KwI8F39MbnPTzPoNDzUkNDVrSQqdnl1FCHJpsBmKiJ0IRLYQDu0JoGgAH9z1AEbHu/L/ bCvjF/db8EBF9LHgthNCNqCt++1u+ud2uct1gokKfJsECxbF4Fv8KWph8vQElUX4iqk2 OqMB7nsrN0Y8Yn90SUvy53pxEXONHFWgh9Vv+oi1e0KmEldl5CcSC14QHr8zZSwRwHRU oaT1epMek2KUx9oY5I0URtsXOhdruqb+QgVR1ld3bc5R3vcgHgYdoXevRkyQC3HZBhce HDQQ== 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=uaADNgPODTX74BXYWBfYbEY76rgPBM23z5cd+uLi2Pk=; b=VrFjtrZLBbMy9U0bP9kyUMxrTgjql7Uqiv4XQwC3m/PYHMDI/Kxj+CN6rqrKPe2n19 DUR8a1mzumi9Pst5K5RGHcw7D70ZvT/L84cfiEOsWHR22jVYWpoahhkS9DoiK0R+QRM+ LMMXDuv+fCHaPhVtCRr4i5ED52LnK2US6y+eK95Gb96o9pM66k/RNn84A7I/dLQIeGEQ 3spJEwm7SEaeH8pakUuODUc6gamKlmGwvEr19yx3/3qo7xBckCfRdcyWuGL/+ojem2EJ bPFdlZcca33AHJ58HEp8Eq0otqFYjSglFte9p5QqoNb/SrPq8xVou/l6UnrcQqXHrf8k t8eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=m4uJKmM1; 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 h189si139751pge.36.2019.08.14.10.20.28; Wed, 14 Aug 2019 10:20:45 -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=m4uJKmM1; 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 S1729843AbfHNRT4 (ORCPT + 99 others); Wed, 14 Aug 2019 13:19:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:34420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730066AbfHNRLM (ORCPT ); Wed, 14 Aug 2019 13:11:12 -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 B8C422133F; Wed, 14 Aug 2019 17:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802672; bh=OAk7QqMcbP1ViKQBmkxH/jmCMAV05Acr4atDy2mMEIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m4uJKmM1R7UA7h/iS1Uvda7+LPlBlq3kREYHPIkiP7oi8prruoZZaNAlOsduHxmWA 0NIHL6Q4o8h+esmSvoF0HJ5vIXOYbwC7Jqr8jGNk4nwLPGMCb+EFG1XDd/ex5T4xZX Ne4kh1OsZ6OmPMotPaH66S5rzxkHkqlFDIFHe/wU= 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.19 73/91] can: peak_usb: pcan_usb_pro: Fix info-leaks to USB devices Date: Wed, 14 Aug 2019 19:01:36 +0200 Message-Id: <20190814165752.821918686@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 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 @@ -502,7 +502,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;