remarkable-linux/net/dccp
Gerrit Renker faf61c3319 dccp: Silently ignore options with nonsensical lengths
This updates the option-parsing code with regard to RFC 4340, 5.8:
 "[..] options with nonsensical lengths (length byte less than two or more
  than the remaining space in the options portion of the header) MUST be
  ignored, and any option space following an option with nonsensical length
  MUST likewise be ignored."

Hence in the following cases erratic options will be ignored:
 1. The type byte of a multi-byte option is the last byte of the header
    options (i.e. effective option length of 1).
 2. The value of the length byte is less than the minimum 2. This has been 
    changed from previously 3: although no multi-byte option with a length
    less than 3 yet exists (cf. table 3 in 5.8), a length of 2 is valid.
    (The switch-statement in dccp_parse has further per-option length checks.)
 3. The option length exceeds the length of the remaining option space.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
2008-09-04 07:45:24 +02:00
..
ccids dccp ccid-3: Length of loss intervals 2008-07-13 11:51:40 +01:00
ackvec.c dccp: Fix sparse warnings 2008-06-11 11:19:09 +01:00
ackvec.h [ACKVEC]: Reduce length of identifiers 2008-01-28 14:54:51 -08:00
ccid.c [CCID]: More informative registration 2008-01-28 14:57:58 -08:00
ccid.h [DCCP]: Introducing CCMPS 2008-01-28 14:57:59 -08:00
dccp.h tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup 2008-08-06 23:50:04 -07:00
diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
feat.c dccp: return -EINVAL on invalid feature length 2008-05-05 13:50:24 -07:00
feat.h [DCCP]: Remove unused and redundant validation functions 2008-01-28 14:57:52 -08:00
input.c dccp: Always generate a Reset in response to option errors 2008-09-04 07:45:24 +02:00
ipv4.c dccp: Fix incorrect length check for ICMPv4 packets 2008-07-26 11:59:10 +01:00
ipv6.c dccp: Add check for truncated ICMPv6 DCCP error packets 2008-07-26 11:59:11 +01:00
ipv6.h Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Kconfig [DCCP]: Promote CCID2 as default CCID 2008-01-28 14:54:46 -08:00
Makefile [DCCPv6]: Resolve conditional build problem 2006-12-02 21:22:28 -08:00
minisocks.c tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup 2008-08-06 23:50:04 -07:00
options.c dccp: Silently ignore options with nonsensical lengths 2008-09-04 07:45:24 +02:00
output.c dccp: Bug-Fix - AWL was never updated 2008-07-26 11:59:10 +01:00
probe.c dccp: Fix sparse warnings 2008-06-11 11:19:09 +01:00
proto.c dccp: change L/R must have at least one byte in the dccpsf_val field 2008-08-13 13:48:39 -07:00
sysctl.c [NET]: Simple ctl_table to ctl_path conversions. 2008-01-28 15:01:07 -08:00
timer.c dccp: Allow to distinguish original and retransmitted packets 2008-07-26 11:59:09 +01:00