CVE-2023-53998

Source
https://cve.org/CVERecord?id=CVE-2023-53998
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53998.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53998
Downstream
Related
Published
2025-12-24T10:55:34.856Z
Modified
2026-03-20T12:33:23.606671Z
Summary
hwrng: virtio - Fix race on data_avail and actual data
Details

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 dataavail with smpstorerelease and reading it with smpload_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 dataidx in randomrecvdone (dataidx must already be zero at this point) and dataavail in requestentropy (ditto).

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53998.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f7f510ec195781c857ab76366a3e1c59e1caae42
Fixed
241ef15776a7c8505008db689175b320d345ecd3
Fixed
a43bcb0b661cbbf3ad797d2aee6b6fd06b8fc69d
Fixed
77471e4912d3960dafe141e268c44be8024fe4dc
Fixed
c76d991b6f01a5d931e7053a73bc9524975a5215
Fixed
22c30022cde6e2c88612b3a499223cfa912f1bc7
Fixed
318657b4c2077289659f1cd9e2a34f6a3b208e3e
Fixed
2fc91f156b3f3446a1bce80cf4adedcbf41271c2
Fixed
ac52578d6e8d300dd50f790f29a24169b1edd26c

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53998.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.6.26
Fixed
4.19.291
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.251
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.188
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.121
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.39
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.3.13
Type
ECOSYSTEM
Events
Introduced
6.4.0
Fixed
6.4.4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53998.json"