• Eldad Zack's avatar
    net/ipv6/exthdrs.c: Strict PadN option checking · c1412fce
    Eldad Zack authored
    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: default avatarEldad Zack <eldad@fogrefinery.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c1412fce
exthdrs.c 21.5 KB