# CVE-2026-87043: sys\_rand\_get() silently returns an unwritten buffer when the entropy device is not ready

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 4.8
- **CVSS:** 4.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.28% (percentile 14, 2026-11-28)
- **CWE:** CWE-330
- **Published:** 2026-11-04T06:09:08.600Z
- **Modified:** 2026-11-09T22:18:56.387Z

## Who should check

- Anyone running zephyrproject zephyr \>= 4.4.0, \< 4.5.0

## Description

The entropy-device random number generator in subsys/random/random\_entropy\_device.c returned early with -ENODEV from rand\_get() as soon as device\_is\_ready() failed, before reaching the non-cryptographic system-timer fallback further down the same function. Because z\_impl\_sys\_rand\_get() returns void and discards that error — and the public sys\_rand\_get() syscall is itself declared void, so it cannot report failure — the caller's output buffer was left untouched and its previous contents were handed back as random data. The thin wrappers make this a plain uninitialized read: sys\_rand32\_get() declares uint32\_t ret;, calls sys\_rand\_get(&ret, sizeof(ret)) and returns ret.

The "not ready" state is a normal runtime condition rather than a fault. Entropy drivers initialise at PRE\_KERNEL\_1 with CONFIG\_ENTROPY\_INIT\_PRIORITY (default 50), so any earlier initialiser — kernel objects run at priority 30 — observes an unready device; the sibling generator subsys/random/random\_xoshiro128.c and z\_early\_rand\_get() in kernel/init.c both already carried an explicit timer fallback for exactly this case. The state is also permanent for the boot when an entropy driver's init hook fails, which several in-tree drivers can do on real hardware (entropy\_stm32 on an RNG clock configuration error, entropy\_psa\_crypto when psa\_crypto\_init() fails, entropy\_nrf\_cracen, entropy\_esp32, entropy\_virtio).

When this occurs, every non-cryptographic random value in the system is either a constant or stale memory. coap\_next\_token() in subsys/net/lib/coap/coap.c fills a static buffer, so every CoAP token becomes the same .bss constant; tcp\_init\_isn() in subsys/net/ip/tcp.c returns an uninitialized stack word as the TCP initial sequence number; DHCPv4/DHCPv6 transaction IDs, WebSocket masking keys and RTP SSRCs are similarly degraded, and arch/arm64/core/pac.c derives per-thread Pointer Authentication keys from the same source. Where the bytes are transmitted directly — SSH packet padding, the netmidi2 session nonce, a DTLS connection ID on builds without CONFIG\_CSPRNG\_ENABLED — stale caller stack or heap contents are disclosed on the wire.

The fix initialises ret to -ENODEV and only calls entropy\_get\_entropy() when the device is ready, so the not-ready case now falls through to the timer fallback and the buffer is always written. The cryptographically secure path is unchanged: sys\_csrand\_get() still propagates the error to the caller and never silently degrades. An attacker cannot induce the unready state, but can observe and exploit the resulting non-random values remotely on an affected device.

## Affected and fixed versions

- zephyrproject zephyr: \>= 4.4.0, \< 4.5.0 (cvelist)

## Mitigation

- Upgrade zephyr to 4.5.0 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-87043. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-87043.md
Affected: zephyrproject zephyr >= 4.4.0, < 4.5.0
Fixed in: zephyrproject zephyr 4.5.0

Steps:
1. Search this machine and project for zephyrproject zephyr: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-87043 being exploited?

There is no confirmed exploitation: CVE-2026-87043 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-87043?

Medium: CVSS 4.8 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-87043?

zephyrproject zephyr \>= 4.4.0, \< 4.5.0.

### Is there a fix for CVE-2026-87043?

Yes. Fixed in zephyrproject zephyr 4.5.0. Upgrade zephyr to 4.5.0 or later.

### How do I check if I'm affected by CVE-2026-87043?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-j6p3-2pm6-rrj9>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/76eb10b5c3e93de5218cc9f1aa313ece3eb5a6e6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-87043>

HTML: <https://flawdb.com/CVE-2026-87043> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-87043>
