[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bcc2850f-f74b-1e5f-84d0-e860ffe6876e@amd.com>
Date: Thu, 21 Apr 2022 08:26:39 -0500
From: Tom Lendacky <thomas.lendacky@....com>
To: Jacky Li <jackyli@...gle.com>,
Brijesh Singh <brijesh.singh@....com>,
John Allen <john.allen@....com>
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Marc Orr <marcorr@...gle.com>, Alper Gun <alpergun@...gle.com>,
Peter Gonda <pgonda@...gle.com>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] crypto: ccp - Fix the INIT_EX data file open failure
On 4/14/22 11:23, Jacky Li wrote:
> There are 2 common cases when INIT_EX data file might not be
> opened successfully and fail the sev initialization:
>
> 1. In user namespaces, normal user tasks (e.g. VMM) can change their
> current->fs->root to point to arbitrary directories. While
> init_ex_path is provided as a module param related to root file
> system. Solution: use the root directory of init_task to avoid
> accessing the wrong file.
>
> 2. Normal user tasks (e.g. VMM) don't have the privilege to access
> the INIT_EX data file. Solution: open the file as root and
> restore permissions immediately.
>
> Fixes: 3d725965f836 ("crypto: ccp - Add SEV_INIT_EX support")
> Signed-off-by: Jacky Li <jackyli@...gle.com>
> Reviewed-by: Peter Gonda <pgonda@...gle.com>
Acked-by: Tom Lendacky <thomas.lendacky@....com>
> ---
> Changelog since v1:
> - Added Fixes tag and Reviewed-By tag.
>
> drivers/crypto/ccp/sev-dev.c | 30 ++++++++++++++++++++++++++++--
> 1 file changed, 28 insertions(+), 2 deletions(-)
>
Powered by blists - more mailing lists