freebsd-src/sbin/ping
Tom Jones 46d7b45a26 ping: Fix handling of IP packet sizes
Ping reads raw IP packets to parse ICMP responses. When reading the
IP Header Len (IHL) ping was was taking the value from the provided
packet without any validation. This could lead to remotely triggerable
stack corruption.

Validate the IHL against expected and recieved data sizes when reading
from the received packet and when reading any quoted packets from within
the ICMP response.

Approved by:	so
Reviewed by:	markj, asomers
Security:	FreeBSD-SA-22:15.ping
Security:	CVE-2022-23093
Sponsored by:   NetApp, Inc.
Sponsored by:   Klara, Inc.
X-NetApp-PR:    #77
Differential Revision: https://reviews.freebsd.org/D37195
2022-11-29 14:51:50 -08:00
..
tests ping_test: Fix tests ping_46 and ping6_46 2022-11-03 10:39:32 -04:00
main.c ping: main.c: Consistent use of white space/tabs 2022-11-03 10:39:32 -04:00
main.h ping: split the visual part of -f into a new option -. 2022-04-18 18:10:50 +02:00
Makefile ping: allow building without INET support 2020-11-28 23:24:19 +00:00
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Add Makefile.depend.options 2019-12-11 17:37:37 +00:00
ping.8 ping: split the visual part of -f into a new option -. 2022-04-18 18:10:50 +02:00
ping.c ping: Fix handling of IP packet sizes 2022-11-29 14:51:50 -08:00
ping.h Merge ping6 to ping 2020-11-26 04:29:30 +00:00
ping6.c ping(8): Correct a typo in source code comment 2022-09-04 13:26:34 +02:00
ping6.h Merge ping6 to ping 2020-11-26 04:29:30 +00:00
utils.c
utils.h