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)
commitc1412fce7eccae62b4de22494f6ab3ff8a90c0c6
tree57ac851f1858a7641cc3a83c486491d4ed1bcd18
parent46ba5b23c32667821b748b4e0b74667e750621cd
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