]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tls: Avoid copying crypto_info again after cipher_type check.
authorIlya Lesokhin <ilyal@mellanox.com>
Mon, 13 Nov 2017 08:22:48 +0000 (10:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Nov 2017 07:26:34 +0000 (16:26 +0900)
commit196c31b4b54474b31dee3c30352c45c2a93e9226
tree41b97d82a0c7f81a832da89c798dc0d470cd237c
parent213ef6e7c9c063c482d77f12cc438872628d48ec
tls: Avoid copying crypto_info again after cipher_type check.

Avoid copying crypto_info again after cipher_type check
to avoid a TOCTOU exploits.
The temporary array on the stack is removed as we don't really need it

Fixes: 3c4d7559159b ('tls: kernel TLS support')
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_main.c