mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
tls: retrun the correct IV in getsockopt
[ Upstream commita1dfa6812b
] Current code returns four bytes of salt followed by four bytes of IV. This patch returns all eight bytes of IV. fixes:3c4d755915
("tls: kernel TLS support") Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cec7d77a1d
commit
94203f213c
1 changed files with 2 additions and 1 deletions
|
@ -299,7 +299,8 @@ static int do_tls_getsockopt_tx(struct sock *sk, char __user *optval,
|
|||
goto out;
|
||||
}
|
||||
lock_sock(sk);
|
||||
memcpy(crypto_info_aes_gcm_128->iv, ctx->iv,
|
||||
memcpy(crypto_info_aes_gcm_128->iv,
|
||||
ctx->iv + TLS_CIPHER_AES_GCM_128_SALT_SIZE,
|
||||
TLS_CIPHER_AES_GCM_128_IV_SIZE);
|
||||
release_sock(sk);
|
||||
if (copy_to_user(optval,
|
||||
|
|
Loading…
Reference in a new issue