Skip to content

net: fix sk_mc_loop() with request and timewait sockets

Eric Dumazet netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest2 patches 2 repliesApplied 2/2

Changes in v3 from the cover letter

- Back to the v1 approach for the sk_mc_loop() fix: checking the destination in TCP (v2) does not cover source routes, multicast
typed routes on unicast prefixes, or the TIME_WAIT reply path.
- Add the TIME_WAIT case and its Fixes tag.
- Add patch 2.
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: use the full socket in sk_mc_loop()net/core/sock.c+1 -01 replyApplied
2/2tcp: use the echoed source route in cookie_v4_check()net/ipv4/syncookies.c+10 -21 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKuniyuki Iwashima
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 net 0/2] net: fix sk_mc_loop() with request and timewait sockets

Patch 1 fixes an out-of-bounds read in sk_mc_loop() when skb->sk is a request or a timewait socket, by using the full socket.

Patch 2 fixes the route lookup of cookie_v4_check() when the ACK carries a source route option, found while looking at the above.

Refusing to send TCP packets to broadcast or multicast destinations is left for net-next.

v3:
- Back to the v1 approach for the sk_mc_loop() fix: checking the destination in TCP (v2) does not cover source routes, multicast
typed routes on unicast prefixes, or the TIME_WAIT reply path.
- Add the TIME_WAIT case and its Fixes tag.
- Add patch 2.
v2: https://lore.kernel.org/netdev/[email protected]/
v1: https://lore.kernel.org/netdev/[email protected]/

Eric Dumazet (1):
tcp: use the echoed source route in cookie_v4_check()

Theodor Arsenij Larionov Trichkine (1):
net: use the full socket in sk_mc_loop()

 net/core/sock.c       |  1 +
 net/ipv4/syncookies.c | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
Signature · 1 line
2.53.0