HomeFreeBSD

When sending IPv4 packets on a SOCK_RAW socket using the IP_HDRINCL option,

Description

When sending IPv4 packets on a SOCK_RAW socket using the IP_HDRINCL option,
ensure that the ip_hl field is valid. Furthermore, ensure that the complete
IPv4 header is contained in the first mbuf. Finally, move the length checks
before relying on them when accessing fields of the IPv4 header.
Reported by: jtl@
Reviewed by: jtl@
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D19181

Details

Provenance
tuexenAuthored on
Differential Revision
D19181: Improve input validation when when using IP_HDRINCL socket option on SOCK_RAW sockets
Parents
rS346181: MFC r345450:
Branches
Unknown
Tags
Unknown