From: Kuniyuki Iwashima <kuniyu@amazon•com>
To: "David S. Miller" <davem@davemloft•net>,
Eric Dumazet <edumazet@google•com>,
Jakub Kicinski <kuba@kernel•org>, Paolo Abeni <pabeni@redhat•com>,
David Ahern <dsahern@kernel•org>,
Willem de Bruijn <willemdebruijn.kernel@gmail•com>
Cc: Kuniyuki Iwashima <kuniyu@amazon•com>,
Kuniyuki Iwashima <kuni1840@gmail•com>, <netdev@vger•kernel.org>
Subject: [PATCH v1 net-next 00/14] udp: Farewell to UDP-Lite.
Date: Mon, 29 May 2023 18:03:34 -0700 [thread overview]
Message-ID: <20230530010348.21425-1-kuniyu@amazon.com> (raw)
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
next reply other threads:[~2023-05-30 1:04 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 1:03 Kuniyuki Iwashima [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230530010348.21425-1-kuniyu@amazon.com \
--to=kuniyu@amazon$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@kernel$(echo .)org \
--cc=edumazet@google$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=kuni1840@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=willemdebruijn.kernel@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox