{"id":"CVE-2023-53998","summary":"hwrng: virtio - Fix race on data_avail and actual data","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nhwrng: virtio - Fix race on data_avail and actual data\n\nThe virtio rng device kicks off a new entropy request whenever the\ndata available reaches zero.  When a new request occurs at the end\nof a read operation, that is, when the result of that request is\nonly needed by the next reader, then there is a race between the\nwriting of the new data and the next reader.\n\nThis is because there is no synchronisation whatsoever between the\nwriter and the reader.\n\nFix this by writing data_avail with smp_store_release and reading\nit with smp_load_acquire when we first enter read.  The subsequent\nreads are safe because they're either protected by the first load\nacquire, or by the completion mechanism.\n\nAlso remove the redundant zeroing of data_idx in random_recv_done\n(data_idx must already be zero at this point) and data_avail in\nrequest_entropy (ditto).","modified":"2026-04-02T09:45:28.304631Z","published":"2025-12-24T10:55:34.856Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0278-1","SUSE-SU-2026:0281-1","SUSE-SU-2026:0293-1","SUSE-SU-2026:0315-1","SUSE-SU-2026:0317-1","SUSE-SU-2026:0411-1","SUSE-SU-2026:0617-1","SUSE-SU-2026:20477-1","SUSE-SU-2026:20498-1","SUSE-SU-2026:20845-1","SUSE-SU-2026:20876-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53998.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/22c30022cde6e2c88612b3a499223cfa912f1bc7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/241ef15776a7c8505008db689175b320d345ecd3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2fc91f156b3f3446a1bce80cf4adedcbf41271c2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/318657b4c2077289659f1cd9e2a34f6a3b208e3e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/77471e4912d3960dafe141e268c44be8024fe4dc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/a43bcb0b661cbbf3ad797d2aee6b6fd06b8fc69d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ac52578d6e8d300dd50f790f29a24169b1edd26c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c76d991b6f01a5d931e7053a73bc9524975a5215"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53998.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53998"},{"type":"PACKAGE","url":"https://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/cve-osv-conversion/osv-output/CVE-2023-53998.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"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/cve-osv-conversion/osv-output/CVE-2023-53998.json"}}],"schema_version":"1.7.5"}