linux/net/tls
Kuniyuki Iwashima c65f27b9c3 tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
get_netdev_for_sock() is called during setsockopt(),
so not under RCU.

Using sk_dst_get(sk)->dev could trigger UAF.

Let's use __sk_dst_get() and dst_dev_rcu().

Note that the only ->ndo_sk_get_lower_dev() user is
bond_sk_get_lower_dev(), which uses RCU.

Fixes: e8f6979981 ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/20250916214758.650211-6-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-09-17 18:10:22 -07:00
..
Kconfig net: skbuff: generalize the skb->decrypted bit 2024-04-06 17:34:31 +01:00
Makefile
tls_device_fallback.c net/tls: use the new scatterwalk functions 2025-03-02 15:19:44 +08:00
tls_device.c tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock(). 2025-09-17 18:10:22 -07:00
tls_main.c net: tls: explicitly disallow disconnect 2025-04-08 11:38:49 +02:00
tls_proc.c tls: snmp: do not use SNMP_MIB_SENTINEL anymore 2025-09-08 18:06:21 -07:00
tls_strp.c tls: handle data disappearing from under the TLS ULP 2025-08-12 18:59:05 -07:00
tls_sw.c tls: fix handling of zero-length records on the rx_list 2025-08-21 07:52:30 -07:00
tls_toe.c
tls.h tls: handle data disappearing from under the TLS ULP 2025-08-12 18:59:05 -07:00
trace.c
trace.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00