diff options
author | Sagi Grimberg <[email protected]> | 2022-11-13 13:24:15 +0200 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2022-11-16 08:36:35 +0100 |
commit | 8d1c1904e94757b78c28fbbef9285e4101d86ee9 (patch) | |
tree | d869264dd728efdaf2052eaceeca53b8c5086508 | |
parent | e481fc0a377798976d5c3044c7f10c86a8372b92 (diff) |
nvme-auth: clear sensitive info right after authentication completes
We don't want to keep authentication sensitive info in memory for unlimited
amount of time.
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
-rw-r--r-- | drivers/nvme/host/auth.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c index 1b44676b6155..04cf183d9519 100644 --- a/drivers/nvme/host/auth.c +++ b/drivers/nvme/host/auth.c @@ -912,6 +912,8 @@ int nvme_auth_wait(struct nvme_ctrl *ctrl, int qid) mutex_unlock(&ctrl->dhchap_auth_mutex); flush_work(&chap->auth_work); ret = chap->error; + /* clear sensitive info */ + nvme_auth_reset_dhchap(chap); return ret; } mutex_unlock(&ctrl->dhchap_auth_mutex); |