Re: [PATCH net 3/3] tls: reset crypto_info when do_tls_setsockopt_tx fails

2018-01-17 Thread David Miller
From: Sabrina Dubroca Date: Tue, 16 Jan 2018 16:04:28 +0100 > The current code copies directly from userspace to ctx->crypto_send, but > doesn't always reinitialize it to 0 on failure. This causes any > subsequent attempt to use this setsockopt to fail because of the > TLS_CRYPTO_INFO_READY check

[PATCH net 3/3] tls: reset crypto_info when do_tls_setsockopt_tx fails

2018-01-16 Thread Sabrina Dubroca
The current code copies directly from userspace to ctx->crypto_send, but doesn't always reinitialize it to 0 on failure. This causes any subsequent attempt to use this setsockopt to fail because of the TLS_CRYPTO_INFO_READY check, eventhough crypto_info is not actually ready. This should result in