mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
nvmet-auth: update sc_c in target host hash calculation
Commit7e091add9c"nvme-auth: update sc_c in host response" added the sc_c variable to the dhchap queue context structure which is appropriately set during negotiate and then used in the host response. This breaks secure concat connections with a Linux target as the target code wasn't updated at the same time. This patch fixes this by adding a new sc_c variable to the host hash calculations. Fixes:7e091add9c("nvme-auth: update sc_c in host response") Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Tested-by: Yi Zhang <yi.zhang@redhat.com> Reviewed-by: Martin George <marting@netapp.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
committed by
Keith Busch
parent
03b3bcd319
commit
159de7a825
@@ -43,6 +43,7 @@ static u8 nvmet_auth_negotiate(struct nvmet_req *req, void *d)
|
||||
data->auth_protocol[0].dhchap.halen,
|
||||
data->auth_protocol[0].dhchap.dhlen);
|
||||
req->sq->dhchap_tid = le16_to_cpu(data->t_id);
|
||||
req->sq->sc_c = data->sc_c;
|
||||
if (data->sc_c != NVME_AUTH_SECP_NOSC) {
|
||||
if (!IS_ENABLED(CONFIG_NVME_TARGET_TCP_TLS))
|
||||
return NVME_AUTH_DHCHAP_FAILURE_CONCAT_MISMATCH;
|
||||
|
||||
Reference in New Issue
Block a user