diff options
author | Kuniyuki Iwashima <kuniyu@google.com> | 2025-09-16 21:47:23 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-17 18:10:22 -0700 |
commit | c65f27b9c3be2269918e1cbad6d8884741f835c5 (patch) | |
tree | a9f9b09d494a7e75403afbd5b341b58256e9397e /rust/kernel/workqueue.rs | |
parent | 0b0e4d51c6554e5ecc3f8cc73c2eaf12da21249a (diff) |
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: e8f69799810c ("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>
Diffstat (limited to 'rust/kernel/workqueue.rs')
0 files changed, 0 insertions, 0 deletions