freebsd-src/tests/sys/net/if_ovpn
Kristof Provost 6ba6c05cb2 if_ovpn: deal with short packets
If we receive a UDP packet (directed towards an active OpenVPN socket)
which is too short to contain an OpenVPN header ('struct
ovpn_wire_header') we wound up making m_copydata() read outside the
mbuf, and panicking the machine.

Explicitly check that the packet is long enough to copy the data we're
interested in. If it's not we will pass the packet to userspace, just
like we'd do for an unknown peer.

Extend a test case to provoke this situation.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2022-07-05 19:27:00 +02:00
..
ccd if_ovpn tests: extend multi_client test with an iroute test 2022-06-28 13:51:41 +02:00
ca.crt
ca.key
client.crt
client.key
client2.crt if_ovpn tests: extend multi_client test with an iroute test 2022-06-28 13:51:41 +02:00
client2.key if_ovpn tests: extend multi_client test with an iroute test 2022-06-28 13:51:41 +02:00
dh.pem
if_ovpn.sh if_ovpn: deal with short packets 2022-07-05 19:27:00 +02:00
Makefile if_ovpn tests: extend multi_client test with an iroute test 2022-06-28 13:51:41 +02:00
server.crt
server.key
user.pass
utils.subr