# CVE-2023-52842: virtio/vsock: Fix uninit-value in virtio\_transport\_recv\_pkt()

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-908
- **Published:** 2024-05-21T15:31:41.180Z
- **Modified:** 2026-06-17T06:43:42.597Z

## Who should check

- Anyone running Linux \>= baddcc2c71572968cdaeee1c4ab3dc0ad90fa765, \< cd12535b97dd7d18cf655ec78ce1cf1f29a576be; \>= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, \< 0b8906fb48b99e993d6e8a12539f618f4854dd26; \>= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, \< 34c4effacfc329aeca5635a69fd9e0f6c90b4101
- Anyone running Linux 6.3

## Description

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

virtio/vsock: Fix uninit-value in virtio\_transport\_recv\_pkt()

KMSAN reported the following uninit-value access issue:

=====================================================
BUG: KMSAN: uninit-value in virtio\_transport\_recv\_pkt+0x1dfb/0x26a0 net/vmw\_vsock/virtio\_transport\_common.c:1421
 virtio\_transport\_recv\_pkt+0x1dfb/0x26a0 net/vmw\_vsock/virtio\_transport\_common.c:1421
 vsock\_loopback\_work+0x3bb/0x5a0 net/vmw\_vsock/vsock\_loopback.c:120
 process\_one\_work kernel/workqueue.c:2630 \[inline\]
 process\_scheduled\_works+0xff6/0x1e60 kernel/workqueue.c:2703
 worker\_thread+0xeca/0x14d0 kernel/workqueue.c:2784
 kthread+0x3cc/0x520 kernel/kthread.c:388
 ret\_from\_fork+0x66/0x80 arch/x86/kernel/process.c:147
 ret\_from\_fork\_asm+0x11/0x20 arch/x86/entry/entry\_64.S:304

Uninit was stored to memory at:
 virtio\_transport\_space\_update net/vmw\_vsock/virtio\_transport\_common.c:1274 \[inline\]
 virtio\_transport\_recv\_pkt+0x1ee8/0x26a0 net/vmw\_vsock/virtio\_transport\_common.c:1415
 vsock\_loopback\_work+0x3bb/0x5a0 net/vmw\_vsock/vsock\_loopback.c:120
 process\_one\_work kernel/workqueue.c:2630 \[inline\]
 process\_scheduled\_works+0xff6/0x1e60 kernel/workqueue.c:2703
 worker\_thread+0xeca/0x14d0 kernel/workqueue.c:2784
 kthread+0x3cc/0x520 kernel/kthread.c:388
 ret\_from\_fork+0x66/0x80 arch/x86/kernel/process.c:147
 ret\_from\_fork\_asm+0x11/0x20 arch/x86/entry/entry\_64.S:304

Uninit was created at:
 slab\_post\_alloc\_hook+0x105/0xad0 mm/slab.h:767
 slab\_alloc\_node mm/slub.c:3478 \[inline\]
 kmem\_cache\_alloc\_node+0x5a2/0xaf0 mm/slub.c:3523
 kmalloc\_reserve+0x13c/0x4a0 net/core/skbuff.c:559
 \_\_alloc\_skb+0x2fd/0x770 net/core/skbuff.c:650
 alloc\_skb include/linux/skbuff.h:1286 \[inline\]
 virtio\_vsock\_alloc\_skb include/linux/virtio\_vsock.h:66 \[inline\]
 virtio\_transport\_alloc\_skb+0x90/0x11e0 net/vmw\_vsock/virtio\_transport\_common.c:58
 virtio\_transport\_reset\_no\_sock net/vmw\_vsock/virtio\_transport\_common.c:957 \[inline\]
 virtio\_transport\_recv\_pkt+0x1279/0x26a0 net/vmw\_vsock/virtio\_transport\_common.c:1387
 vsock\_loopback\_work+0x3bb/0x5a0 net/vmw\_vsock/vsock\_loopback.c:120
 process\_one\_work kernel/workqueue.c:2630 \[inline\]
 process\_scheduled\_works+0xff6/0x1e60 kernel/workqueue.c:2703
 worker\_thread+0xeca/0x14d0 kernel/workqueue.c:2784
 kthread+0x3cc/0x520 kernel/kthread.c:388
 ret\_from\_fork+0x66/0x80 arch/x86/kernel/process.c:147
 ret\_from\_fork\_asm+0x11/0x20 arch/x86/entry/entry\_64.S:304

CPU: 1 PID: 10664 Comm: kworker/1:5 Not tainted 6.6.0-rc3-00146-g9f3ebbef746f \#3
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc38 04/01/2014
Workqueue: vsock-loopback vsock\_loopback\_work
=====================================================

The following simple reproducer can cause the issue described above:

int main(void)
{
  int sock;
  struct sockaddr\_vm addr = {
    .svm\_family = AF\_VSOCK,
    .svm\_cid = VMADDR\_CID\_ANY,
    .svm\_port = 1234,
  };

  sock = socket(AF\_VSOCK, SOCK\_STREAM, 0);
  connect(sock, (struct sockaddr \*)&addr, sizeof(addr));
  return 0;
}

This issue occurs because the \`buf\_alloc\` and \`fwd\_cnt\` fields of the
\`struct virtio\_vsock\_hdr\` are not initialized when a new skb is allocated
in \`virtio\_transport\_init\_hdr()\`. This patch resolves the issue by
initializing these fields during allocation.

## Affected and fixed versions

- Linux: \>= baddcc2c71572968cdaeee1c4ab3dc0ad90fa765, \< cd12535b97dd7d18cf655ec78ce1cf1f29a576be; \>= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, \< 0b8906fb48b99e993d6e8a12539f618f4854dd26; \>= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, \< 34c4effacfc329aeca5635a69fd9e0f6c90b4101 (cvelist)
- Linux: 6.3 (cvelist)

## Mitigation

- Upgrade Linux to 34c4effacfc329aeca5635a69fd9e0f6c90b4101 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-52842.md
Affected: Linux >= baddcc2c71572968cdaeee1c4ab3dc0ad90fa765, < cd12535b97dd7d18cf655ec78ce1cf1f29a576be; >= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, < 0b8906fb48b99e993d6e8a12539f618f4854dd26; >= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, < 34c4effacfc329aeca5635a69fd9e0f6c90b4101; Linux 6.3
Fixed in: Linux 0b8906fb48b99e993d6e8a12539f618f4854dd26, Linux 34c4effacfc329aeca5635a69fd9e0f6c90b4101

Steps:
1. Search this machine and project for Linux: 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-2023-52842 being exploited?

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

### How serious is CVE-2023-52842?

High: CVSS 7.1 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-52842?

Linux \>= baddcc2c71572968cdaeee1c4ab3dc0ad90fa765, \< cd12535b97dd7d18cf655ec78ce1cf1f29a576be; \>= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, \< 0b8906fb48b99e993d6e8a12539f618f4854dd26; \>= 71dc9ec9ac7d3eee785cdc986c3daeb821381e20, \< 34c4effacfc329aeca5635a69fd9e0f6c90b4101; Linux 6.3.

### Is there a fix for CVE-2023-52842?

Yes. Fixed in Linux 0b8906fb48b99e993d6e8a12539f618f4854dd26, Linux 34c4effacfc329aeca5635a69fd9e0f6c90b4101. Upgrade Linux to 34c4effacfc329aeca5635a69fd9e0f6c90b4101 or later.

### How do I check if I'm affected by CVE-2023-52842?

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

- patch: <https://git.kernel.org/stable/c/cd12535b97dd7d18cf655ec78ce1cf1f29a576be>
- patch: <https://git.kernel.org/stable/c/0b8906fb48b99e993d6e8a12539f618f4854dd26>
- patch: <https://git.kernel.org/stable/c/34c4effacfc329aeca5635a69fd9e0f6c90b4101>

## 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-2023-52842>

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