linux/net/mptcp
Kuniyuki Iwashima cc976ec9e3 mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().
[ Upstream commit 893c49a78d ]

mptcp_active_enable() is called from subflow_finish_connect(),
which is icsk->icsk_af_ops->sk_rx_dst_set() and it's not always
under RCU.

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

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

Fixes: 27069e7cb3 ("mptcp: disable active MPTCP in case of blackhole")
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250916214758.650211-8-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:04:01 +02:00
..
bpf.c bpf: Add update_socket_protocol hook 2023-08-16 10:22:16 -07:00
crypto.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
crypto_test.c mptcp: fill in missing MODULE_DESCRIPTION() 2023-12-17 20:54:22 +00:00
ctrl.c mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable(). 2025-10-15 12:04:01 +02:00
diag.c tcp: ulp: diag: more info without CAP_NET_ADMIN 2025-03-07 19:39:53 -08:00
fastopen.c mptcp: cleanup mem accounting 2025-02-19 19:05:28 -08:00
Kconfig kunit: mptcp: adhere to KUNIT formatting standard 2021-04-16 17:10:40 -07:00
Makefile mptcp: pm: split in-kernel PM specific code 2025-03-10 13:35:50 -07:00
mib.c mptcp: track fallbacks accurately via mibs 2025-07-25 11:29:04 -07:00
mib.h mptcp: track fallbacks accurately via mibs 2025-07-25 11:29:04 -07:00
mptcp_diag.c mptcp: drop duplicate header inclusions 2024-03-06 20:24:10 -08:00
mptcp_pm_gen.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-11-07 13:44:16 -08:00
mptcp_pm_gen.h mptcp: add token for get-addr in yaml 2024-03-04 13:07:45 +00:00
options.c mptcp: tfo: record 'deny join id0' info 2025-09-15 18:12:05 -07:00
pm.c mptcp: disable add_addr retransmission when timeout is 0 2025-08-18 17:39:58 -07:00
pm_kernel.c mptcp: pm: kernel: flush: do not reset ADD_ADDR limit 2025-08-18 17:39:58 -07:00
pm_netlink.c mptcp: pm: nl: announce deny-join-id0 flag 2025-09-15 18:12:05 -07:00
pm_userspace.c mptcp: pm: Defer freeing of MPTCP userspace path manager entries 2025-04-23 16:27:58 -07:00
protocol.c mptcp: propagate shutdown to subflows when possible 2025-09-15 18:10:36 -07:00
protocol.h mptcp: remove pr_fallback() 2025-07-25 11:29:04 -07:00
sched.c mptcp: sched: split validation part 2025-04-15 08:21:46 -07:00
sockopt.c mptcp: sockopt: make sync_socket_options propagate SOCK_KEEPOPEN 2025-09-09 18:38:06 -07:00
subflow.c mptcp: Fix up subflow's memcg when CONFIG_SOCK_CGROUP_DATA=n. 2025-10-15 12:03:44 +02:00
syncookies.c mptcp: don't return sockets in foreign netns 2021-09-24 10:51:36 +01:00
token.c mptcp: add statistics for mptcp socket in use 2023-01-09 07:30:50 +00:00
token_test.c mptcp: token kunit: set protocol 2024-02-26 18:42:12 -08:00