Skip to content

Fix UDP length overflow in edge cases

Alice Mikityanska netdev 5 versions – 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 · linked by author and title

  1. v5 Latest4 patches 1 replyApplied 4/4
  2. v44 patches 4 repliesSuperseded
  3. v34 patches 5 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches5 repliesSuperseded
v11 of 4 patches4 repliesSuperseded

Patches in v5 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: ipv4: Fix UDP length overflow with PMTU discover and big MTUnet/ipv4/ip_output.c+1 -00 repliesApplied
2/4net: ipv6: Fix UDP length overflow with PMTU discover and big MTUnet/ipv6/ip6_output.c+2 -00 repliesApplied
3/4selftests: net: Test UDP length overflow with PMTU discover and big MTUtools/testing/selftests/net/Makefile tools/testing/selftests/net/cork_fragsize.py+188 -01 replyApplied
4/4net: ipv6: Clamp to IP6_MAX_MTU in ip6_dst_mtu_maybe_forwardinclude/net/ip6_route.h+2 -00 repliesApplied

Reviews trailers per patch

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

PatchWillem de Bruijn
1/4R-b
2/4R-b
3/4R-b
4/4R-b

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

Read the v5 thread

Cover letter [PATCH net v5 0/4] Fix UDP length overflow in edge cases

From: Alice Mikityanska <[email protected]>

These are fixes for rare edge cases of 16-bit UDP length field overflow that might happen on netdevs with MTU >= 64k.

Exposed by the new WARN added to udp_set_len_short, reported by syzbot.

v5 changes: Added docstrings to the selftest, used defer.

v4: https://lore.kernel.org/netdev/[email protected]/

v4 changes: Fixed IPv6 commit message; deduplicated code in the selftest and fixed pylint and ruff warnings.

v3: https://lore.kernel.org/netdev/[email protected]/

v3 changes: Split IPv4, IPv6 and selftest; limited the clamp to UDP sockets to support UDP jumbograms over raw sockets; added a selftest for raw sockets; added the kernel config check to the selftest.

v2: https://lore.kernel.org/netdev/[email protected]/

v2 changes: Restored the MTU clamp in ip6_dst_mtu_maybe_forward.

v1: https://lore.kernel.org/netdev/[email protected]/

Alice Mikityanska (4):
net: ipv4: Fix UDP length overflow with PMTU discover and big MTU
net: ipv6: Fix UDP length overflow with PMTU discover and big MTU
selftests: net: Test UDP length overflow with PMTU discover and big
MTU
net: ipv6: Clamp to IP6_MAX_MTU in ip6_dst_mtu_maybe_forward

 include/net/ip6_route.h                      |   2 +
 net/ipv4/ip_output.c                         |   1 +
 net/ipv6/ip6_output.c                        |   2 +
 tools/testing/selftests/net/Makefile         |   1 +
 tools/testing/selftests/net/cork_fragsize.py | 187 +++++++++++++++++++
 5 files changed, 193 insertions(+)
 create mode 100755 tools/testing/selftests/net/cork_fragsize.py
Signature · 1 line
2.55.0