Skip to content

icmpv6_filter: correct minimum ICMPv6 message size

Werner Almesberger netdev 1 version Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2icmpv6_filter: fix "_hdr" incorrectly being a pointernet/ipv6/raw.c+1 -11 reply
2/2icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytesnet/ipv6/raw.c+6 -11 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/2] icmpv6_filter: correct minimum ICMPv6 message size

These two patches correct the minimum ICMPv6 message size enforced by net/ipv6/raw.c:icmpv6_filter

The first patch corrects a type error. Because of the error, ICMPv6 raw sockets on 32 bit systems accepted ICMPv6 messages as small as 4 bytes, while 64 bit systems required at least 8 bytes.

The second patch reduces the amount of data we require from eight (i.e., the ICMPv6 header plus four bytes of message body) to four bytes. This is needed for protocols like RPL (RFC 6550) that use ICMPv6 messages with bodies smaller than four bytes.

Note that applications that assume that the kernel will not pass such short ICMPv6 messages on raw sockets may misbehave on 64 bit systems after applying these patches. However, even if such applications exist, they would already have that vulnerability on 32 bit systems.

- Werner

Werner Almesberger (2):
icmpv6_filter: fix "_hdr" incorrectly being a pointer
icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytes

 net/ipv6/raw.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.1.2