Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13929876pxu; Mon, 4 Jan 2021 08:13:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwp+TGOuXPgdwH7kSG2bzDfP+TcBc7lSAATC1CWHs1gqOkHX5OO9f3a02hFvqx4rGr2Un9z X-Received: by 2002:a05:6402:1045:: with SMTP id e5mr72087457edu.40.1609776809006; Mon, 04 Jan 2021 08:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609776808; cv=none; d=google.com; s=arc-20160816; b=0jpSEH6yZZn6nLDMuDHQNxZ90EPsWUcheJrI/XggdYzAtC7ogZ5kG+8hdEWOwJpXS6 GgZLgNk5smfxy47j2O1y650ISwUf9XT1OXhlIMx1d48+z07AgYb3P3o3YMTPAXFP3JPb uRrcfZfXppqMI2xe5mfRgqOGSAkqlMbhinuHthYjgILGRjDyHQkTVPIvNtp07VTIIa5e WUMkZR26H6F/bK/2FchRd52X3OrMSLPpVQWIDxmv8T6XVlLt73Z72A2mJxHobMpqG1nx /mWLTdc4H8GTZHRe6p+81tNjHgNaD3itk67oGMUYu6l9VzS11HrA3wBHlaYdwY3Y754H Og/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5wpSmCS8EUM/qz304VYz6GuI+2zS1dSAd5wFbHXT1B4=; b=j/Xr5QWwvIJvXUdQINI93O76twbnpqUxyb2oWr/Yg9mrP+uaU9XPLyPuwIFWkwmluE bxDz9QbV7JzOkR6ylrvGX5PEgP5zSGavi+RFAoGLxv+0LameT7pvYxMSoKpggpQKubtU RUQZQ48FasO7WLwMVGbYpY2mdWLsTpfICZdQSsk6LM/YpPqpoHjbjQ+dZ6N3SPhE/lNG mtwLi8LKzN0fhESZQiZdl32/zAm1PFaOgvYXkA7HVBFJ9WGkby3l+9/9geM1D6bRiV6b i0jnXi/d4+O3mTM/I2QNUtDz/8w309M9wIlkDpm6WY19iLb82Iag5l9pHlIKKWTVuQ7q kJvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HUOy3qTY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp39si29110314ejc.214.2021.01.04.08.13.05; Mon, 04 Jan 2021 08:13:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HUOy3qTY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727412AbhADQKp (ORCPT + 99 others); Mon, 4 Jan 2021 11:10:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:36580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728307AbhADQAU (ORCPT ); Mon, 4 Jan 2021 11:00:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3DA7420769; Mon, 4 Jan 2021 16:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609776004; bh=xG67Zm/Pub3LnzeGF+mtGQjupBLMb7U8Wk+xH/2uKM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HUOy3qTYNPGEb+VAq0Fmk/TATkJN8S72sIjUghFaYAIV6zamqMPeRfd7jJoAHFfbS Ipc2vE3oGWSgHKHHsvKtMJ/uy0RijnQss/3qnivS6zG1Sa/PcQweIQb3CUVt8/lOMS IhKhON1R+PwYzc6uZjIdL/giEYAx6IjGOBtyWHGI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com, Anant Thazhemadam Subject: [PATCH 5.4 27/47] misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() Date: Mon, 4 Jan 2021 16:57:26 +0100 Message-Id: <20210104155707.054036333@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210104155705.740576914@linuxfoundation.org> References: <20210104155705.740576914@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anant Thazhemadam commit 31dcb6c30a26d32650ce134820f27de3c675a45a upstream. A kernel-infoleak was reported by syzbot, which was caused because dbells was left uninitialized. Using kzalloc() instead of kmalloc() fixes this issue. Reported-by: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com Tested-by: syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201122224534.333471-1-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/misc/vmw_vmci/vmci_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b/drivers/misc/vmw_vmci/vmci_context.c @@ -743,7 +743,7 @@ static int vmci_ctx_get_chkpt_doorbells( return VMCI_ERROR_MORE_DATA; } - dbells = kmalloc(data_size, GFP_ATOMIC); + dbells = kzalloc(data_size, GFP_ATOMIC); if (!dbells) return VMCI_ERROR_NO_MEM;