CVE-2023-53998
hwrng: virtio - Fix race on data_avail and actual data
Check your servers for CVE-2023-53998
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-53998 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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).
Exploitation
EPSS 0.23%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 14.1% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before 241ef15776a7c8505008db689175b320d345ecd3 affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before a43bcb0b661cbbf3ad797d2aee6b6fd06b8fc69d affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before 77471e4912d3960dafe141e268c44be8024fe4dc affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before c76d991b6f01a5d931e7053a73bc9524975a5215 affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before 22c30022cde6e2c88612b3a499223cfa912f1bc7 affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before 318657b4c2077289659f1cd9e2a34f6a3b208e3e affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before 2fc91f156b3f3446a1bce80cf4adedcbf41271c2 affected from f7f510ec195781c857ab76366a3e1c59e1caae42, before ac52578d6e8d300dd50f790f29a24169b1edd26c
Other versions: unaffected
|
| Linux |
affected 2.6.26 unaffected before 2.6.26 unaffected from 4.19.291 up to and including 4.19.* unaffected from 5.4.251 up to and including 5.4.* unaffected from 5.10.188 up to and including 5.10.* unaffected from 5.15.121 up to and including 5.15.* unaffected from 6.1.39 up to and including 6.1.* unaffected from 6.3.13 up to and including 6.3.* unaffected from 6.4.4 up to and including 6.4.* unaffected 6.5 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-53998 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-53998
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-53998
trivy image --scanners vuln IMAGE | grep CVE-2023-53998
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/241ef15776a7c8505008db689175b320d345ecd3 git.kernel.org
- https://git.kernel.org/stable/c/a43bcb0b661cbbf3ad797d2aee6b6fd06b8fc69d git.kernel.org
- https://git.kernel.org/stable/c/77471e4912d3960dafe141e268c44be8024fe4dc git.kernel.org
- https://git.kernel.org/stable/c/c76d991b6f01a5d931e7053a73bc9524975a5215 git.kernel.org
- https://git.kernel.org/stable/c/22c30022cde6e2c88612b3a499223cfa912f1bc7 git.kernel.org
- https://git.kernel.org/stable/c/318657b4c2077289659f1cd9e2a34f6a3b208e3e git.kernel.org
- https://git.kernel.org/stable/c/2fc91f156b3f3446a1bce80cf4adedcbf41271c2 git.kernel.org
- https://git.kernel.org/stable/c/ac52578d6e8d300dd50f790f29a24169b1edd26c git.kernel.org
Source: the record CVE-2023-53998 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse