Ilya Lesokhin
797b8bb47f
tls: Fix TLS ulp context leak, when TLS_TX setsockopt is not used.
...
commit ff45d820a2 upstream.
Previously the TLS ulp context would leak if we attached a TLS ulp
to a socket but did not use the TLS_TX setsockopt,
or did use it but it failed.
This patch solves the issue by overriding prot[TLS_BASE_TX].close
and fixing tls_sk_proto_close to work properly
when its called with ctx->tx_conf == TLS_BASE_TX.
This patch also removes ctx->free_resources as we can use ctx->tx_conf
to obtain the relevant information.
Fixes: 3c4d755915 ('tls: kernel TLS support')
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
[bwh: Backported to 4.14: Keep using tls_ctx_free() as introduced by
the earlier backport of "tls: zero the crypto information from
tls_context before freeing"]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2018-12-05 19:41:10 +01:00
..
2017-07-11 06:08:58 -04:00
2018-04-19 08:56:19 +02:00
2017-11-02 11:10:55 +01:00
2018-07-08 15:30:49 +02:00
2018-08-24 13:08:57 +02:00
2018-09-29 03:06:01 -07:00
2016-02-11 03:54:14 -05:00
2018-02-25 11:07:47 +01:00
2018-08-24 13:09:14 +02:00
2017-04-12 22:02:36 +02:00
2017-11-09 10:03:09 +09:00
2017-11-02 11:10:55 +01:00
2015-09-17 13:20:05 +02:00
2017-08-29 10:55:20 +01:00
2017-11-02 11:10:55 +01:00
2018-08-22 07:46:08 +02:00
2017-11-02 11:10:55 +01:00
2018-01-31 14:03:44 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-02-09 04:45:49 -05:00
2017-05-27 18:51:41 -04:00
2018-10-18 09:16:17 +02:00
2017-08-11 14:59:24 -07:00
2017-07-04 22:35:16 +01:00
2018-02-25 11:07:45 +01:00
2016-07-08 12:20:57 +02:00
2017-01-20 12:12:13 -05:00
2017-07-04 01:29:04 -07:00
2016-04-19 20:09:25 -04:00
2016-04-25 16:44:27 -04:00
2016-06-25 12:19:35 -04:00
2016-04-25 16:44:27 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-31 14:42:19 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-05 11:53:34 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-09 09:51:48 +02:00
2017-08-22 14:29:30 -07:00
2017-11-02 11:10:55 +01:00
2015-09-23 15:33:15 -07:00
2017-09-01 20:33:42 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-18 09:40:35 +02:00
2016-09-30 13:29:21 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-04-27 22:48:25 -04:00
2017-01-25 16:00:33 +01:00
2016-01-04 20:40:41 +01:00
2017-07-04 01:29:04 -07:00
2018-04-29 11:33:13 +02:00
2015-12-15 23:25:20 -05:00
2017-01-18 13:04:28 -05:00
2017-08-07 11:39:22 -07:00
2017-11-02 11:10:55 +01:00
2017-06-15 12:12:40 -04:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:43:48 +02:00
2017-08-07 11:39:21 -07:00
2018-10-18 09:16:21 +02:00
2018-05-16 10:10:24 +02:00
2017-11-02 11:10:55 +01:00
2016-03-13 23:55:13 -04:00
2017-09-01 17:42:05 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-10-18 09:16:17 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:43:46 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-09-19 22:43:46 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-08-17 19:36:23 -04:00
2016-10-13 12:05:26 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:20 +02:00
2018-08-22 07:46:08 +02:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:51:58 +02:00
2016-07-08 13:23:12 +02:00
2017-11-02 11:10:55 +01:00
2017-04-01 20:21:44 -07:00
2016-10-03 02:00:22 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-08-24 13:08:57 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-01 07:39:09 -07:00
2017-11-02 11:10:55 +01:00
2015-12-08 22:02:33 -05:00
2017-11-02 11:10:55 +01:00
2018-05-16 10:10:23 +02:00
2016-07-08 12:20:57 +02:00
2017-08-29 15:16:52 -07:00
2017-11-02 11:10:55 +01:00
2016-03-23 22:09:58 -04:00
2017-11-09 10:03:09 +09:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-01 03:55:47 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-07 11:39:21 -07:00
2017-11-02 11:10:55 +01:00
2018-02-25 11:07:59 +01:00
2018-05-30 07:52:01 +02:00
2017-07-01 07:39:08 -07:00
2017-11-02 11:10:55 +01:00
2018-05-30 07:52:14 +02:00
2017-11-02 11:10:55 +01:00
2018-03-31 18:10:40 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2016-11-09 20:40:06 -05:00
2017-08-25 17:10:23 -07:00
2018-04-19 08:56:16 +02:00
2017-11-02 11:10:55 +01:00
2016-04-28 11:49:45 -04:00
2017-11-02 11:10:55 +01:00
2018-12-01 09:42:51 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-25 10:37:11 +09:00
2017-08-07 14:48:48 -07:00
2018-09-15 09:45:29 +02:00
2015-07-09 15:12:20 -07:00
2018-12-05 19:41:10 +01:00
2018-06-26 08:06:28 +08:00
2017-11-02 11:10:55 +01:00
2017-08-29 15:16:52 -07:00
2017-11-02 11:10:55 +01:00
2018-06-26 08:06:28 +08:00
2018-03-08 22:41:10 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-03 10:24:25 +01:00