VYPR
Unrated severityNVD Advisory· Published Dec 24, 2025· Updated Apr 15, 2026

CVE-2023-53998

CVE-2023-53998

Description

In the Linux kernel, the following vulnerability has been resolved:

hwrng: virtio - Fix race on data_avail and actual data

The virtio rng device kicks off a new entropy request whenever the data available reaches zero. When a new request occurs at the end of a read operation, that is, when the result of that request is only needed by the next reader, then there is a race between the writing of the new data and the next reader.

This is because there is no synchronisation whatsoever between the writer and the reader.

Fix this by writing data_avail with smp_store_release and reading it with smp_load_acquire when we first enter read. The subsequent reads are safe because they're either protected by the first load acquire, or by the completion mechanism.

Also remove the redundant zeroing of data_idx in random_recv_done (data_idx must already be zero at this point) and data_avail in request_entropy (ditto).

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A race condition in the Linux kernel's virtio-rng driver can cause a read to return stale or uninitialized entropy data.

Vulnerability

CVE-2023-53998 is a race condition in the Linux kernel's virtio-rng (hardware random number generator) driver. The driver uses a shared data_avail counter to track how many entropy bytes are available in a buffer. When a read operation exhausts the available data, the buffer, the driver triggers a new request to the virtio device. However, there is no synchronization between the writer (the device's completion callback) and the reader (the read function), leading to a window where the reader can observe an updated data_avail value before the corresponding data has been written into the buffer [1].

Exploitation

An attacker would require local access to the kernel's /dev/hwrng device. The attacker must be able to open and read from the device file. The race window is narrow but can be triggered repeatedly by a malicious or buggy userspace program that reads from /dev/hwrng in a tight loop. No special privileges beyond read access to the device are required [2].

Impact

A successful exploit could cause a read operation to return stale or uninitialized data from the buffer, potentially leaking kernel memory contents to userspace. Since the random number generator is used by cryptographic subsystems and other security-sensitive components, this could weaken entropy guarantees or disclose sensitive information [3].

Mitigation

The fix was applied in Linux kernel stable releases via commits that commit [4]. Users should update to a kernel version containing the patch. The fix uses smp_store_release and smp_load_acquire to ensure proper ordering between the writer and reader, eliminating the race condition [1].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

1

Patches

8

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.