// For flags

CVE-2022-23093

Stack overflow in ping(8)

Severity Score

6.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

3
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

ping reads raw IP packets from the network to process responses in the pr_pack() function. As part of processing a response ping has to reconstruct the IP header, the ICMP header and if present a "quoted packet," which represents the packet that generated an ICMP error. The quoted packet again has an IP header and an ICMP header. The pr_pack() copies received IP and ICMP headers into stack buffers for further processing. In so doing, it fails to take into account the possible presence of IP option headers following the IP header in either the response or the quoted packet. When IP options are present, pr_pack() overflows the destination buffer by up to 40 bytes. The memory safety bugs described above can be triggered by a remote host, causing the ping program to crash. The ping process runs in a capability mode sandbox on all affected versions of FreeBSD and is thus very constrained in how it can interact with the rest of the system at the point where the bug can occur.

ping lee paquetes IP sin procesar de la red para procesar las respuestas en la función pr_pack(). Como parte del procesamiento de una respuesta de ping, se debe reconstruir el encabezado IP, el encabezado ICMP y, si está presente, un "paquete citado", que representa el paquete que generó un error ICMP. El paquete citado nuevamente tiene un encabezado IP y un encabezado ICMP. pr_pack() copia los encabezados IP e ICMP recibidos en búferes de pila para su posterior procesamiento. Al hacerlo, no tiene en cuenta la posible presencia de encabezados de opciones de IP después del encabezado de IP, ya sea en la respuesta o en el paquete citado. Cuando las opciones de IP están presentes, pr_pack() desborda el búfer de destino hasta en 40 bytes. Los errores de seguridad de la memoria descritos anteriormente pueden ser desencadenados por un host remoto, lo que provoca que el programa ping falle. El proceso de ping se ejecuta en un modo sandbox de capacidad en todas las versiones afectadas de FreeBSD y, por lo tanto, está muy limitado en cuanto a cómo puede interactuar con el resto del sistema en el punto donde puede ocurrir el error.

ping reads raw IP packets from the network to process responses in the pr_pack() function. As part of processing a response ping has to reconstruct the IP header, the ICMP header and if present a "quoted packet," which represents the packet that generated an ICMP error. The quoted packet again has an IP header and an ICMP header. The pr_pack() copies received IP and ICMP headers into stack buffers for further processing. In so doing, it fails to take into account the possible presence of IP option headers following the IP header in either the response or the quoted packet. When IP options are present, pr_pack() overflows the destination buffer by up to 40 bytes. The memory safety bugs described above can be triggered by a remote host, causing the ping program to crash. The ping process runs in a capability mode sandbox on all affected versions of FreeBSD and is thus very constrained in how it can interact with the rest of the system at the point where the bug can occur.

*Credits: NetApp, Inc.
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
None
Integrity
None
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2022-01-10 CVE Reserved
  • 2022-11-29 CVE Published
  • 2023-03-25 First Exploit
  • 2024-10-28 CVE Updated
  • 2025-07-06 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-120: Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
*-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
*-
Affected