# CVE-2023-54008: virtio\_vdpa: build affinity masks conditionally

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **Published:** 2025-12-24T10:55:41.982Z
- **Modified:** 2026-06-17T06:46:31.727Z

## Who should check

- Anyone running Linux \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< 5f2592243ccd5bb5341f59be409ccfdd586841f3; \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< 628b53fc66ca1910a3cb53c3c7e44e59750c3668; \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< ae15aceaa98ad9499763923f7890e345d9f46b60
- Anyone running Linux 6.4

## Description

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

virtio\_vdpa: build affinity masks conditionally

We try to build affinity mask via create\_affinity\_masks()
unconditionally which may lead several issues:

- the affinity mask is not used for parent without affinity support
  (only VDUSE support the affinity now)
- the logic of create\_affinity\_masks() might not work for devices
  other than block. For example it's not rare in the networking device
  where the number of queues could exceed the number of CPUs. Such
  case breaks the current affinity logic which is based on
  group\_cpus\_evenly() who assumes the number of CPUs are not less than
  the number of groups. This can trigger a warning\[1\]:

	if (ret \>= 0)
		WARN\_ON(nr\_present + nr\_others \< numgrps);

Fixing this by only build the affinity masks only when

- Driver passes affinity descriptor, driver like virtio-blk can make
  sure to limit the number of queues when it exceeds the number of CPUs
- Parent support affinity setting config ops

This help to avoid the warning. More optimizations could be done on
top.

\[1\]
\[  682.146655\] WARNING: CPU: 6 PID: 1550 at lib/group\_cpus.c:400 group\_cpus\_evenly+0x1aa/0x1c0
\[  682.146668\] CPU: 6 PID: 1550 Comm: vdpa Not tainted 6.5.0-rc5jason+ \#79
\[  682.146671\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
\[  682.146673\] RIP: 0010:group\_cpus\_evenly+0x1aa/0x1c0
\[  682.146676\] Code: 4c 89 e0 5b 5d 41 5c 41 5d 41 5e c3 cc cc cc cc e8 1b c4 74 ff 48 89 ef e8 13 ac 98 ff 4c 89 e7 45 31 e4 e8 08 ac 98 ff eb c2 \<0f\> 0b eb b6 e8 fd 05 c3 00 45 31 e4 eb e5 cc cc cc cc cc cc cc cc
\[  682.146679\] RSP: 0018:ffffc9000215f498 EFLAGS: 00010293
\[  682.146682\] RAX: 000000000001f1e0 RBX: 0000000000000041 RCX: 0000000000000000
\[  682.146684\] RDX: ffff888109922058 RSI: 0000000000000041 RDI: 0000000000000030
\[  682.146686\] RBP: ffff888109922058 R08: ffffc9000215f498 R09: ffffc9000215f4a0
\[  682.146687\] R10: 00000000000198d0 R11: 0000000000000030 R12: ffff888107e02800
\[  682.146689\] R13: 0000000000000030 R14: 0000000000000030 R15: 0000000000000041
\[  682.146692\] FS:  00007fef52315740(0000) GS:ffff888237380000(0000) knlGS:0000000000000000
\[  682.146695\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  682.146696\] CR2: 00007fef52509000 CR3: 0000000110dbc004 CR4: 0000000000370ee0
\[  682.146698\] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
\[  682.146700\] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
\[  682.146701\] Call Trace:
\[  682.146703\]  \<TASK\>
\[  682.146705\]  ? \_\_warn+0x7b/0x130
\[  682.146709\]  ? group\_cpus\_evenly+0x1aa/0x1c0
\[  682.146712\]  ? report\_bug+0x1c8/0x1e0
\[  682.146717\]  ? handle\_bug+0x3c/0x70
\[  682.146721\]  ? exc\_invalid\_op+0x14/0x70
\[  682.146723\]  ? asm\_exc\_invalid\_op+0x16/0x20
\[  682.146727\]  ? group\_cpus\_evenly+0x1aa/0x1c0
\[  682.146729\]  ? group\_cpus\_evenly+0x15c/0x1c0
\[  682.146731\]  create\_affinity\_masks+0xaf/0x1a0
\[  682.146735\]  virtio\_vdpa\_find\_vqs+0x83/0x1d0
\[  682.146738\]  ? \_\_pfx\_default\_calc\_sets+0x10/0x10
\[  682.146742\]  virtnet\_find\_vqs+0x1f0/0x370
\[  682.146747\]  virtnet\_probe+0x501/0xcd0
\[  682.146749\]  ? vp\_modern\_get\_status+0x12/0x20
\[  682.146751\]  ? get\_cap\_addr.isra.0+0x10/0xc0
\[  682.146754\]  virtio\_dev\_probe+0x1af/0x260
\[  682.146759\]  really\_probe+0x1a5/0x410

## Affected and fixed versions

- Linux: \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< 5f2592243ccd5bb5341f59be409ccfdd586841f3; \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< 628b53fc66ca1910a3cb53c3c7e44e59750c3668; \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< ae15aceaa98ad9499763923f7890e345d9f46b60 (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2023-54008.md
Affected: Linux >= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, < 5f2592243ccd5bb5341f59be409ccfdd586841f3; >= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, < 628b53fc66ca1910a3cb53c3c7e44e59750c3668; >= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, < ae15aceaa98ad9499763923f7890e345d9f46b60; Linux 6.4
Fixed in: Linux 5f2592243ccd5bb5341f59be409ccfdd586841f3, Linux 628b53fc66ca1910a3cb53c3c7e44e59750c3668

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-54008 being exploited?

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< 5f2592243ccd5bb5341f59be409ccfdd586841f3; \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< 628b53fc66ca1910a3cb53c3c7e44e59750c3668; \>= 3dad56823b5332ffdbe1867b2d7b50fbacea124a, \< ae15aceaa98ad9499763923f7890e345d9f46b60; Linux 6.4.

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

Yes. Fixed in Linux 5f2592243ccd5bb5341f59be409ccfdd586841f3, Linux 628b53fc66ca1910a3cb53c3c7e44e59750c3668. No fix listed yet: follow the vendor advisory.

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

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

- other: <https://git.kernel.org/stable/c/5f2592243ccd5bb5341f59be409ccfdd586841f3>
- other: <https://git.kernel.org/stable/c/628b53fc66ca1910a3cb53c3c7e44e59750c3668>
- other: <https://git.kernel.org/stable/c/ae15aceaa98ad9499763923f7890e345d9f46b60>

## 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-54008>

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