RFC ipv6: Disable IPv6 Destination Options RX processing by default
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | ipv6: Check of max HBH or DestOp sysctl is zero and drop if it isnet/ | +4 | 2 replies | |
| 2/3 | ipv6: Disable IPv6 Destination Options RX processing by defaultinclude/ | +5 | 6 replies | |
| 3/3 | ipv6: Document defauit of zero for max_dst_opts_numberDocumentation/ | +27 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Justin Iurman |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC net-next 0/3] ipv6: Disable IPv6 Destination Options RX processing by default
Set IP6_DEFAULT_MAX_DST_OPTS_CNT to zero. This disables processing of Destinations Options extension headers by default. Processing can be enabled by setting the net.ipv6.max_dst_opts_number to a non-zero value.
The rationale for this is that Destination Options pose a serious risk of Denial off Service attack. The problem is that even if the default limit is set to a small number (previously it was eight) there is still the possibility of a DoS attack. All an attacker needs to do is create and MTU size packet filled with 8 bytes Destination Options Extension Headers. Each Destination EH simply contains a single padding option with six bytes of zeroes.
In a 1500 byte MTU size packet, 182 of these dummy Destination Options headers can be placed in a packet. Per RFC8200, a host must accept and process a packet with any number of Destination Options extension headers. So when the stack processes such a packet it is a lot of work and CPU cycles that provide zero benefit. The packet can be designed such that every byte after the IP header requires a conditional check and branch prediction can be rendered useless for that. This also may mean over twenty cache misses per packet. In other words, these packets filled with dummy Destination Options extension headers are the basis for what would be an effective DoS attack.
Disabling Destination Options is not a major issue for the following reasons:
* Linux kernel only supports one Destination Option (Home Address Option). There is no evidence this has seen any real world use
* On the Internet packets with Destination Options are dropped with a high enough rate such that use of Destination Options is not feasible
* It is unknown however quite possible that no one anywhere is using Destination Options for anything but experiments, class projects, or DoS. If someone is using them in their private network then it's easy enough to configure a non-zero limit for their use case
Tom Herbert (3):
ipv6: Check of max HBH or DestOp sysctl is zero and drop if it is
ipv6: Disable IPv6 Destination Options RX processing by default
ipv6: Document defauit of zero for max_dst_opts_number
Documentation/networking/ip-sysctl.rst | 38 ++++++++++++++++++-------- include/net/ipv6.h | 7 +++-- net/ipv6/exthdrs.c | 6 ++-- 3 files changed, 36 insertions(+), 15 deletions(-)
Signature · 1 line
2.43.0