netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite.
@ 2023-05-30  1:03 Kuniyuki Iwashima
  2023-05-30  1:03 ` [PATCH v1 net-next 01/14] udp: Random clenaup Kuniyuki Iwashima
                   ` (14 more replies)
  0 siblings, 15 replies; 29+ messages in thread
From: Kuniyuki Iwashima @ 2023-05-30  1:03 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	David Ahern, Willem de Bruijn
  Cc: Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

Recently syzkaller reported a 7-year-old null-ptr-deref [0] that occurs
when a UDP-Lite socket tries to allocate a buffer under memory pressure.

Someone should have stumbled on the bug much earlier if UDP-Lite had been
used in a real app.  Additionally, we do not always need a large UDP-Lite
workload to hit the bug since UDP and UDP-Lite share the same memory
accounting limit.

Given no one uses UDP-Lite, we can drop it and simplify UDP code by
removing a bunch of conditionals.

This series removes UDP-Lite support from the core networking stack first
and incrementally removes the dead code.

[0]: https://lore.kernel.org/netdev/20230523163305.66466-1-kuniyu@amazon.com/


Kuniyuki Iwashima (14):
  udp: Random clenaup.
  udplite: Retire UDP-Lite for IPv6.
  ipv6: Remove IPV6_ADDRFORM support for IPPROTO_UDPLITE.
  udplite: Retire UDP-Lite for IPv4.
  udp: Remove UDP-Lite SNMP stats.
  udp: Remove UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV.
  udp: Remove pcslen, pcrlen, and pcflag in struct udp_sock.
  udp: Remove csum branch for UDP-Lite.
  udp: Don't pass proto to udp[46]_csum_init().
  udp: Don't pass proto to __udp[46]_lib_rcv().
  udp: Optimise ulen tests in __udp[46]_lib_rcv().
  udp: Remove udp_table in struct proto.
  udp: Remove udp_table in struct udp_seq_afinfo.
  udp: Don't pass udp_table to __udp[46]_lib_lookup().

 include/linux/udp.h        |  14 +-
 include/net/ip6_checksum.h |   1 -
 include/net/ipv6.h         |   2 -
 include/net/ipv6_stubs.h   |   3 +-
 include/net/netns/mib.h    |   5 -
 include/net/sock.h         |   5 +-
 include/net/transp_v6.h    |   3 -
 include/net/udp.h          |  71 +++----
 include/net/udplite.h      |  86 --------
 net/core/filter.c          |   5 +-
 net/ipv4/Makefile          |   2 +-
 net/ipv4/af_inet.c         |  10 -
 net/ipv4/proc.c            |  15 --
 net/ipv4/udp.c             | 421 ++++++++++++-------------------------
 net/ipv4/udp_bpf.c         |   2 -
 net/ipv4/udp_diag.c        |  84 ++------
 net/ipv4/udp_impl.h        |  29 ---
 net/ipv4/udp_offload.c     |   5 +-
 net/ipv4/udplite.c         | 136 ------------
 net/ipv6/Makefile          |   2 +-
 net/ipv6/af_inet6.c        |  25 +--
 net/ipv6/ip6_checksum.c    |  49 +----
 net/ipv6/ipv6_sockglue.c   |  17 +-
 net/ipv6/proc.c            |  16 --
 net/ipv6/udp.c             | 294 ++++++++++++--------------
 net/ipv6/udp_impl.h        |  31 ---
 net/ipv6/udp_offload.c     |   5 +-
 net/ipv6/udplite.c         | 136 ------------
 28 files changed, 330 insertions(+), 1144 deletions(-)
 delete mode 100644 include/net/udplite.h
 delete mode 100644 net/ipv4/udp_impl.h
 delete mode 100644 net/ipv4/udplite.c
 delete mode 100644 net/ipv6/udp_impl.h
 delete mode 100644 net/ipv6/udplite.c

-- 
2.30.2


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

end of thread, other threads:[~2023-05-31  6:44 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30  1:03 [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 01/14] udp: Random clenaup Kuniyuki Iwashima
2023-05-30 12:56   ` Simon Horman
2023-05-30  1:03 ` [PATCH v1 net-next 02/14] udplite: Retire UDP-Lite for IPv6 Kuniyuki Iwashima
2023-05-30 13:01   ` Simon Horman
2023-05-30 17:49     ` Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 03/14] ipv6: Remove IPV6_ADDRFORM support for IPPROTO_UDPLITE Kuniyuki Iwashima
2023-05-30 14:22   ` Simon Horman
2023-05-30  1:03 ` [PATCH v1 net-next 04/14] udplite: Retire UDP-Lite for IPv4 Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 05/14] udp: Remove UDP-Lite SNMP stats Kuniyuki Iwashima
2023-05-30 14:24   ` Simon Horman
2023-05-30  1:03 ` [PATCH v1 net-next 06/14] udp: Remove UDPLITE_SEND_CSCOV and UDPLITE_RECV_CSCOV Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 07/14] udp: Remove pcslen, pcrlen, and pcflag in struct udp_sock Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 08/14] udp: Remove csum branch for UDP-Lite Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 09/14] udp: Don't pass proto to udp[46]_csum_init() Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 10/14] udp: Don't pass proto to __udp[46]_lib_rcv() Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 11/14] udp: Optimise ulen tests in __udp[46]_lib_rcv() Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 12/14] udp: Remove udp_table in struct proto Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 13/14] udp: Remove udp_table in struct udp_seq_afinfo Kuniyuki Iwashima
2023-05-30  1:03 ` [PATCH v1 net-next 14/14] udp: Don't pass udp_table to __udp[46]_lib_lookup() Kuniyuki Iwashima
2023-05-30  2:15 ` [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite Willem de Bruijn
2023-05-30 17:34   ` Kuniyuki Iwashima
2023-05-30 20:16     ` Willem de Bruijn
2023-05-30 22:14       ` Jakub Kicinski
2023-05-31  1:01         ` Kuniyuki Iwashima
2023-05-31  4:25           ` Eric Dumazet
2023-05-31  5:10             ` Jakub Kicinski
2023-05-31  6:24               ` Paolo Abeni
2023-05-31  6:44                 ` Jakub Kicinski

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).