freebsd-dev/sys/netinet6
Kornel Dulęba 82042465c3 icmp6: Improve validation of PMTU
Currently we accept any pmtu between IPV6_MMTU(1280B) and the link mtu.
In some network topologies could allow a bad actor to perform a DOS attack.
Contrary to IPv4 in IPv6 oversized packets are dropped, and a ICMP
PACKET_TOO_BIG message is sent back to the sender.
After receiving an ICMPv6 packet with pmtu bigger than the
current one the victim will start sending frames that will be dropped
a router with reduced MTU.
Although it will eventually receive another message with correct pmtu,
an attacker can still just inject their spoofed packets frequently
enough to overwrite the correct value.
This issue is described in detail in RFC8201, section 6.
Fix this by checking the current pmtu, and accepting the new one only
if it's smaller.

Approved by:	mw(mentor)
Reviewed by:	tuexen
MFC after:	1 week
Sponsored by:	Stormshield
Obtained from:	Semihalf
Differential Revision: https://reviews.freebsd.org/D35871
2022-07-27 16:09:56 +02:00
..
dest6.c
frag6.c netinet6: Fix a typo in a sysctl description 2021-11-30 07:24:44 +01:00
icmp6.c icmp6: Improve validation of PMTU 2022-07-27 16:09:56 +02:00
icmp6.h
in6_cksum.c
in6_fib_algo.c Fix dpdk/ldradix fib lookup algorithm preference calculation. 2021-03-07 22:17:53 +00:00
in6_fib.c Fix unused-function waring when compiling with FIB_ALGO. 2021-01-30 23:25:56 +00:00
in6_fib.h Add modular fib lookup framework. 2020-12-25 11:33:17 +00:00
in6_gif.c net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros 2021-03-04 20:56:48 +01:00
in6_ifattach.c nd6: Mark several callouts as MPSAFE 2021-08-09 13:27:52 -04:00
in6_ifattach.h
in6_jail.c sysent: Get rid of bogus sys/sysent.h include. 2022-05-28 20:52:17 +03:00
in6_mcast.c in6p_set_multicast_if(): fix malloc(M_WAITOK) with epoch 2021-12-06 14:33:23 -08:00
in6_pcb.c in_pcb: use jenkins hash over the entire IPv6 (or IPv4) address 2021-12-26 10:47:28 -08:00
in6_pcb.h Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
in6_proto.c domains: make domain_init() initialize only global state 2022-01-03 10:15:22 -08:00
in6_rmx.c netinet6: Use __diagused for variables only used in KASSERT(). 2022-04-13 16:08:19 -07:00
in6_rss.c Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
in6_rss.h Implement flowid calculation for outbound connections to balance 2020-10-18 17:15:47 +00:00
in6_src.c netinet6: simplify selectroute() 2022-07-08 11:27:16 +00:00
in6_var.h netinet6: fix ndp proxying 2022-05-30 10:53:33 +00:00
in6.c netinet6: fix panic on kldunload pfsync 2022-06-01 09:26:15 +02:00
in6.h Add in_localip_fib(), in6_localip_fib(). 2021-11-12 08:59:42 -08:00
ip6_ecn.h
ip6_fastfwd.c
ip6_forward.c
ip6_gre.c udp: allow udp_tun_func_t() to indicate it did not eat the packet 2022-04-12 10:04:59 +02:00
ip6_id.c
ip6_input.c netinet6: fix interface handling for loopback traffic 2022-07-10 12:47:47 +00:00
ip6_mroute.c ip6_mroute: Mark a variable only used in a debug trace as unused. 2022-04-06 16:45:29 -07:00
ip6_mroute.h
ip6_output.c netinet6: fix interface handling for loopback traffic 2022-07-10 12:47:47 +00:00
ip6_var.h protocols: init with standard SYSINIT(9) or VNET_SYSINIT 2022-01-03 10:15:21 -08:00
ip6.h
ip6protosw.h
ip_fw_nat64.h
ip_fw_nptv6.h
mld6_var.h
mld6.c mbuf: remove PH_vt alias for mbuf packet header persistent shared data 2022-05-13 13:32:43 -07:00
mld6.h
nd6_nbr.c netinet6: fix ndp proxying 2022-05-30 10:53:33 +00:00
nd6_rtr.c netinet6: Fix a typo in a source code comment 2022-03-28 19:32:10 +02:00
nd6.c Adjust function definition in nd6.c to avoid clang 15 warnings 2022-07-26 21:25:09 +02:00
nd6.h lltable: Add support for "child" LLEs holding encap for IPv4oIPv6 entries. 2021-08-21 17:34:35 +00:00
pim6_var.h
pim6.h
raw_ip6.c rip6: Fix a lock order reversal in rip6_bind() 2022-06-14 12:00:59 -04:00
raw_ip6.h
route6.c
scope6_var.h
scope6.c ifnet_byindex() actually requires network epoch 2021-12-06 09:32:31 -08:00
sctp6_usrreq.c sctp: improve sctp_pathmtu_adjustment() 2021-12-30 15:16:05 +01:00
sctp6_var.h
send.c socket: Implement SO_RERROR 2021-07-28 09:35:09 -07:00
send.h
tcp6_var.h tcp: add support for TCP over UDP 2021-04-18 16:16:42 +02:00
udp6_usrreq.c sockbuf: merge two versions of sbcreatecontrol() into one 2022-05-17 10:10:42 -07:00
udp6_var.h