Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5456791pxu; Tue, 22 Dec 2020 18:36:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLjOrm6crW1fIlv1zwaZjy7492nDIsBjxal6tzZeyckqfGVE2syn5KrfS9YGDi6suW+Spf X-Received: by 2002:a17:906:391b:: with SMTP id f27mr21684413eje.195.1608691010590; Tue, 22 Dec 2020 18:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691010; cv=none; d=google.com; s=arc-20160816; b=ltxpIP6xR13m42PJWx4jtoM54Zhy533qvziz8a+AdssH09kc4vGHOHECzbAbB+OuJl +g2tsgP3jYucSld3jiLw7/sz04rx2j9kai3qV10TfbahGVJ7C99teX5ooTP9WLvsq/nk 8c6PLWq9fayU1Ts0NdUy/PJY8Xrf7F+idBOd9tTwdJ/SlvQzdmKg96dITI32zWcxy+JD AA6L4As/sx2rwgMw2M05g/iXqFDdqp02NcNajjSWtrT98xILCKZyha+mrWbHJGjTWsmF baKJexq691eOThRdIu9yUJ9Ykr315GmAHn4b5xbS/ixH3kkZX+wZQHQsHT30WPDD2Zxt 98CA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ggj+n6TbA1jQUgDb5q3hJ7gSNwcXyaI6h5q0HFrWTcQ=; b=KPMpFz52v2Dzl5o4vOtyngo2Lk4RbkFY8WDwDc0qimVZhk8Tpnb9ml4G8CSbJuwpw4 liuPvVUuTxIOJTt5IO7DvBhrIldAb5GKo3H0RIA4wWTEqqIkKo0JHye5qlIdAlo6I5HQ gczOhjboPqhsZdid5+p4ycitsym1JZmyBS9MbRTCOnYRGkO0epgH7OZnAkXl1tg83sZK VVKvaxqpoYzC86SEWT3Uh4jaEZttWGslYRRi9j/CQIpMpw1MEjOsNYlxGejfBZQgQJEI mdVcXQ8Rz7Stekt2PvVYQ8Sc6YMmMAdbtBZ5AtWgcQyy20kjTD2r/Rf5Y8xvuvQl6QvT fAxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Jf1vAYcL; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z27si13748127edl.135.2020.12.22.18.36.28; Tue, 22 Dec 2020 18:36:50 -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=@kernel.org header.s=k20201202 header.b=Jf1vAYcL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729233AbgLWCfS (ORCPT + 99 others); Tue, 22 Dec 2020 21:35:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:54942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729395AbgLWCYl (ORCPT ); Tue, 22 Dec 2020 21:24:41 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EDD7622248; Wed, 23 Dec 2020 02:23:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690240; bh=PNzbCRIG/yIP/e2lUq+1swsm+0VlMdlrCzWkPbqYMm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jf1vAYcLjGruDupLh4it9yUHSMFfMwcZddeRqJF9k1P8nzlhDb41YKUoGYOcf5BgY YbMVbKcEcLVczhYQ+fx4UbT4ISuOTSwspzNnYmXZmcVxmeOjFo31pTgD7L1S5qfKpH ucea9HPgAunuyYu25Y4s+MPc9NIHSurfoUoRSsu5gbvylceGji9VXyeqKMF6HbAln6 WEcPL+TBd7+MOWeUIMpDC0zNcSlDxtvX3bLls+35gSFujoRk6fi4N9SS8AaLpSobeg Nvjhye7TPLDMpEKt0DpnfCoEt8LMEqGl7vDYNhKw/xTXV8pHnX8XWXiHbRZ6Jy6BqL FKhXmo1FWdepw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Anant Thazhemadam , syzbot+a79e17c39564bedf0930@syzkaller.appspotmail.com, Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.14 54/66] misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells() Date: Tue, 22 Dec 2020 21:22:40 -0500 Message-Id: <20201223022253.2793452-54-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anant Thazhemadam [ Upstream commit 31dcb6c30a26d32650ce134820f27de3c675a45a ] 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 Signed-off-by: Sasha Levin --- drivers/misc/vmw_vmci/vmci_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/vmw_vmci/vmci_context.c b/drivers/misc/vmw_vmci/vmci_context.c index bc089e634a751..26e20b091160a 100644 --- a/drivers/misc/vmw_vmci/vmci_context.c +++ b/drivers/misc/vmw_vmci/vmci_context.c @@ -751,7 +751,7 @@ static int vmci_ctx_get_chkpt_doorbells(struct vmci_ctx *context, return VMCI_ERROR_MORE_DATA; } - dbells = kmalloc(data_size, GFP_ATOMIC); + dbells = kzalloc(data_size, GFP_ATOMIC); if (!dbells) return VMCI_ERROR_NO_MEM; -- 2.27.0