]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv6/exthdrs.c: Strict PadN option checking
authorEldad Zack <eldad@fogrefinery.com>
Thu, 12 Apr 2012 21:36:17 +0000 (17:36 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Apr 2012 21:36:44 +0000 (17:36 -0400)
commit6f012452c9af1f5cfab40bbed1b65715924f4609
tree57ac851f1858a7641cc3a83c486491d4ed1bcd18
parentce6667092bbc07482c588cef97b4ff117c8f334d
net/ipv6/exthdrs.c: Strict PadN option checking

Added strict checking of PadN, as PadN can be used to increase header
size and thus push the protocol header into the 2nd fragment.

PadN is used to align the options within the Hop-by-Hop or
Destination Options header to 64-bit boundaries. The maximum valid
size is thus 7 bytes.
RFC 4942 recommends to actively check the "payload" itself and
ensure that it contains only zeroes.

See also RFC 4942 section 2.1.9.5.

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/exthdrs.c