]> git.baikalelectronics.ru Git - 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)
commit48318f93a185e20e10f535c79be2fe6fcbfa7139
tree41b97d82a0c7f81a832da89c798dc0d470cd237c
parentcf9c6f944a6624babd9de736cb45ecf759e285f4
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: 3a71956a2d9a ('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