Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13956862pxu; Mon, 4 Jan 2021 08:58:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbJHx/U8Oh+oztI5CVbH8+Y3MK4OUX7mgPv8VhgpKzkG+CkZoNeZ5hiPCv6xso2h3LP1PS X-Received: by 2002:aa7:d3d4:: with SMTP id o20mr16739959edr.190.1609779487466; Mon, 04 Jan 2021 08:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609779487; cv=none; d=google.com; s=arc-20160816; b=iFaf/Umbb+IkWSP/iOjIO46L7JTSCw5CH7Sf+hxwuc9JAqBRfjxUBPSfvRrRMluKfb Hp3dBAFczs0lOxPr2K2yCoJ0QBSJmEPYFRRAHjRQuVDF4qbdU+P3P89DQpGF1EElRhwO NDC/jGMqn6kMk8rASFh0RNVzQQ/+nUNTowjS9FVJNB4dnGnBJvGFpEesasDMhcqaWjSw qxE5HUU0uMTb6rkKnpiZ7xXb3DBHmD+t58YXVCbJCmJ+G5fRjuXDRk7KfqkNMydlmkgF eqqtYlFAeMDKXU4Be6G+dWTMJhgQu/h6/RTdevV1WoV58Hz2yhoMePQIHkvq93jQ5Vzd Z01w== 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=BYsr4j4SUDocHW0ZCK2LlJzrIcS86sbcuew97XmvrlsXxlryhxJitCOZqX1sm5kJDM no3nCyj+jzQ9/7K6y1xV8iEjWdmTdermyVaz8es4FjgY099ZYQMpGHPHHwfeyuP8jtYt GOQUZYG8zS/S9jkry/BiF+g4AO5OK+E9U5sMdqoGycD+e9nsBAe38c9gBOeedJh6bHpx qL2+K7lg6KaopsHuxx2FLuUioAQuocQ5d1EgWNWTrwJeDWRaQtxSMUi0CBZxLfzqI9gi wxAF4W2JFpN2hGwvuIUj2NGlMjkZbxi9F2XrsHWTgnNVWIFpKZfaHqwWK57XZpbOfXFC MUsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=BK5TzQFj; 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 dk11si32168286edb.594.2021.01.04.08.57.44; Mon, 04 Jan 2021 08:58:07 -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=BK5TzQFj; 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 S1729050AbhADQGt (ORCPT + 99 others); Mon, 4 Jan 2021 11:06:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:40012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728898AbhADQCn (ORCPT ); Mon, 4 Jan 2021 11:02:43 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6CC4A22516; Mon, 4 Jan 2021 16:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609776122; bh=xG67Zm/Pub3LnzeGF+mtGQjupBLMb7U8Wk+xH/2uKM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BK5TzQFjrTcO0ttslxfRtZnIlUMKmo2it7YxkdFZeprVVrZaifTFB5M+K9hE0XvSd cfoPu439iNBo7QvfgLQilb3SMqhAYN8/VRyzIsluvDEuq9IgdiJGO2QuTwwCMQuW0p r9ymzDSCdJsw3kFPHzkF+WcFruKV0ZtJ71c2SId8= 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.10 30/63] misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() Date: Mon, 4 Jan 2021 16:57:23 +0100 Message-Id: <20210104155710.281866429@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210104155708.800470590@linuxfoundation.org> References: <20210104155708.800470590@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;