netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/7] net: Fix UAF of sk_dst_get(sk)->dev.
@ 2025-09-16 21:47 Kuniyuki Iwashima
  2025-09-16 21:47 ` [PATCH v2 net-next 1/7] smc: Fix use-after-free in __pnet_find_base_ndev() Kuniyuki Iwashima
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Kuniyuki Iwashima @ 2025-09-16 21:47 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

syzbot caught use-after-free of sk_dst_get(sk)->dev,
which was not fetched under RCU nor RTNL. [0]

Patch 1 ~ 5, 7 fix UAF in smc, tcp, ktls, mptcp
Patch 6 fixes dst ref leak in mptcp


[0]: https://lore.kernel.org/netdev/68c237c7.050a0220.3c6139.0036.GAE@google.com/


Changes:
  v2:
    * Rebase to net-next (Eric)
    * Drop tcp patch as it's already fixed in net-next (Eric)
    * Drop sk_dst_dev_rcu() helper patch and use dst_dev_rcu() directly (Eric)
    * Split mptcp dst_release() patch (Matthieu)

  v1: https://lore.kernel.org/netdev/20250911030620.1284754-1-kuniyu@google.com/


Kuniyuki Iwashima (7):
  smc: Fix use-after-free in __pnet_find_base_ndev().
  smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set().
  smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().
  smc: Use __sk_dst_get() and dst_dev_rcu() in smc_vlan_by_tcpsk().
  tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
  mptcp: Call dst_release() in mptcp_active_enable().
  mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().

 net/mptcp/ctrl.c     |  9 ++++--
 net/smc/smc_clc.c    | 67 +++++++++++++++++++++++---------------------
 net/smc/smc_core.c   | 27 ++++++++----------
 net/smc/smc_pnet.c   | 43 ++++++++++++++--------------
 net/tls/tls_device.c | 18 ++++++------
 5 files changed, 86 insertions(+), 78 deletions(-)

-- 
2.51.0.384.g4c02a37b29-goog


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-09-18  7:35 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 21:47 [PATCH v2 net-next 0/7] net: Fix UAF of sk_dst_get(sk)->dev Kuniyuki Iwashima
2025-09-16 21:47 ` [PATCH v2 net-next 1/7] smc: Fix use-after-free in __pnet_find_base_ndev() Kuniyuki Iwashima
2025-09-17  6:52   ` Mahanta Jambigi
2025-09-17  6:56     ` Kuniyuki Iwashima
2025-09-17 14:18   ` Eric Dumazet
2025-09-16 21:47 ` [PATCH v2 net-next 2/7] smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set() Kuniyuki Iwashima
2025-09-17 14:12   ` Eric Dumazet
2025-09-16 21:47 ` [PATCH v2 net-next 3/7] smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match() Kuniyuki Iwashima
2025-09-17 14:13   ` Eric Dumazet
2025-09-16 21:47 ` [PATCH v2 net-next 4/7] smc: Use __sk_dst_get() and dst_dev_rcu() in smc_vlan_by_tcpsk() Kuniyuki Iwashima
2025-09-17  9:13   ` Mahanta Jambigi
2025-09-17 14:09     ` Eric Dumazet
2025-09-17 17:41       ` Kuniyuki Iwashima
2025-09-18  7:34         ` Mahanta Jambigi
2025-09-16 21:47 ` [PATCH v2 net-next 5/7] tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock() Kuniyuki Iwashima
2025-09-17 14:14   ` Eric Dumazet
2025-09-17 15:45   ` Sabrina Dubroca
2025-09-16 21:47 ` [PATCH v2 net-next 6/7] mptcp: Call dst_release() in mptcp_active_enable() Kuniyuki Iwashima
2025-09-17 10:17   ` Matthieu Baerts
2025-09-17 14:04     ` Eric Dumazet
2025-09-17 14:51       ` Matthieu Baerts
2025-09-16 21:47 ` [PATCH v2 net-next 7/7] mptcp: Use __sk_dst_get() and dst_dev_rcu() " Kuniyuki Iwashima
2025-09-17 10:17   ` Matthieu Baerts
2025-09-17 17:43     ` Kuniyuki Iwashima
2025-09-17 14:10   ` Eric Dumazet
2025-09-18  1:20 ` [PATCH v2 net-next 0/7] net: Fix UAF of sk_dst_get(sk)->dev patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).