CVE-2023-5941
publishedlibc stdio buffer overflow
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| FreeBSD | — | FreeBSD12.4-RELEASE to < p7 · 13.2-RELEASE to < p5 · Other versions: unknown | Affected | Not stated | freebsd |
Description
In versions of FreeBSD 12.4-RELEASE prior to 12.4-RELEASE-p7 and FreeBSD 13.2-RELEASE prior to 13.2-RELEASE-p5 the __sflush() stdio function in libc does not correctly update FILE objects' write space members for write-buffered streams when the write(2) system call returns an error. Depending on the nature of an application that calls libc's stdio functions and the presence of errors returned from the write(2) system call (or an overridden stdio write routine) a heap buffer overflow may occur. Such overflows may lead to data corruption or the execution of arbitrary code at the privilege level of the calling program.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| FreeBSD | FreeBSD | 12.4-RELEASE to < p7 (affected · release)13.2-RELEASE to < p5 (affected · release)Default: unknown | freebsd · cna |
Weaknesses
2- CWE-787 CWE-787 Out-of-bounds Write
- CWE-131 CWE-131 Incorrect Calculation of Buffer Size
References
2Provider assertions
2freebsd · cna
libc stdio buffer overflow
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- bef3008d48fae6dcedb74b237a242a16d9eaf596ac248c8a2e9daa42e9cbb92b
- Ingested
- 23 Sep 2026, 08:15:31 UTC
- Source record
- Official CVE record