CVE-2026-39457
JSON

7.8high

Stack overflow via select() file descriptor set overflow

Severity
7.8high CVSS:3.1 by CISA-ADP
Exploit likelihood
0.15% (higher than 4% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
freebsd

Description

When exchanging data over a socket, libnv uses select(2) to wait for data to arrive. However, it does not verify whether the provided socket descriptor fits in select(2)'s file descriptor set size limit of FD_SETSIZE (1024). An attacker who is able to force a libnv application to allocate large file descriptors, e.g., by opening many descriptors and executing a program which is not careful to close them upon startup, can trigger stack corruption. If the target application is setuid-root, then this could be used to elevate local privileges.

Affected

Product or packageVersionsReported by
FreeBSD FreeBSDfrom 15.0-RELEASE before p7, from 14.4-RELEASE before p3, from 14.3-RELEASE before p12, from 13.5-RELEASE before p13, 13.5, 14.3, 14.4, 15.0CVE List, NVD

Classification

CWE-121

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

When exchanging data over a socket, libnv uses select(2) to wait for data to arrive. However, it does not verify whether the provided socket descriptor fits in select(2)'s file descriptor set size limit of FD_SETSIZE (1024). An attacker who is able to force a libnv application to allocate large file descriptors, e.g., by opening many descriptors and executing a program which is not careful to close them upon startup, can trigger stack corruption. If the target application is setuid-root, then this could be used to elevate local privileges.

NVD (es)

Al intercambiar datos a través de un socket, libnv utiliza select(2) para esperar la llegada de datos. Sin embargo, no verifica si el descriptor de socket proporcionado cabe en el límite de tamaño del conjunto de descriptores de archivo de select(2) de FD_SETSIZE (1024). Un atacante que es capaz de forzar a una aplicación libnv a asignar descriptores de archivo grandes, por ejemplo, abriendo muchos descriptores y ejecutando un programa que no tiene cuidado de cerrarlos al inicio, puede desencadenar corrupción de pila. Si la aplicación objetivo es setuid-root, entonces esto podría usarse para elevar privilegios locales.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-39457 changed 2026-05-01CVE Terms of Use
NVDCVE-2026-39457 changed 2026-11-11Public domain