Skip to content

RFC tcp: increase resilence vs. blind data injection

Florian Westphal netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tcp: randomize tcp timestamp offsets for each connectioninclude/linux/tcp.h include/net/secure_seq.h include/net/tcp.h +8 more+74 -3412 replies
2/3tcp: add tcp_timestamps=2 mode to force tsecr validation on ofo segmentsDocumentation/networking/ip-sysctl.txt net/ipv4/tcp_input.c+41 -20 replies
3/3tcp: add mib counter to track ts tsecr validation failuresinclude/uapi/linux/snmp.h net/ipv4/proc.c net/ipv4/tcp_input.c+3 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/3] tcp: increase resilence vs. blind data injection

This series introduces a new tcp_timestamps=2 mode.

When enabled, out-of-order packets that carry data are also subject to a range check of TSecr (timestamp echo).

Current kernels use a global timestamp echo, i.e. the timestamp values are known.

Therefore first patch adds per connection randomzation of timestamp. The ISN generator is re-used for this purpose to get same offset for all connections with identical connection quadruple.

Second patch adds the new timestamp mode, default is not changed.

Third patch adds a MIB counter to track when we drop skb because of the new facility.

Syncookies are not yet converted to use tsoff.
Depending on how discussion about this set will turn out I will add this for the v1 submit.

 Documentation/networking/ip-sysctl.txt |    8 ++++--
 include/linux/tcp.h                    |    1 
 include/net/secure_seq.h               |   13 ++++++---
 include/net/tcp.h                      |    2 -
 include/uapi/linux/snmp.h              |    1 
 net/core/secure_seq.c                  |   19 +++++++++-----
 net/ipv4/proc.c                        |    1 
 net/ipv4/syncookies.c                  |    1 
 net/ipv4/tcp_input.c                   |   43 ++++++++++++++++++++++++++++++++-
 net/ipv4/tcp_ipv4.c                    |   30 +++++++++++++++--------
 net/ipv4/tcp_minisocks.c               |    4 ++-
 net/ipv4/tcp_output.c                  |    2 -
 net/ipv6/syncookies.c                  |    1 
 net/ipv6/tcp_ipv6.c                    |   28 +++++++++++++--------
 14 files changed, 118 insertions(+), 36 deletions(-)