# CVE-2024-58018: nvkm: correctly calculate the available space of the GSP cmdq buffer

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; 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.28% (percentile 13, 2026-11-26)
- **Published:** 2025-02-27T02:12:09.595Z
- **Modified:** 2026-06-17T08:14:28.470Z

## Who should check

- Anyone running Linux \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 56e6c7f6d2a6b4e0aae0528c502e56825bb40598; \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 6b6b75728c86f60c1fc596f0d4542427d0e6065b; \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 01ed662bdd6fce4f59c1804b334610d710d79fa0
- Anyone running Linux 6.7

## Description

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

nvkm: correctly calculate the available space of the GSP cmdq buffer

r535\_gsp\_cmdq\_push() waits for the available page in the GSP cmdq
buffer when handling a large RPC request. When it sees at least one
available page in the cmdq, it quits the waiting with the amount of
free buffer pages in the queue.

Unfortunately, it always takes the \[write pointer, buf\_size) as
available buffer pages before rolling back and wrongly calculates the
size of the data should be copied. Thus, it can overwrite the RPC
request that GSP is currently reading, which causes GSP hang due
to corrupted RPC request:

\[  549.209389\] ------------\[ cut here \]------------
\[  549.214010\] WARNING: CPU: 8 PID: 6314 at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:116 r535\_gsp\_msgq\_wait+0xd0/0x190 \[nvkm\]
\[  549.225678\] Modules linked in: nvkm(E+) gsp\_log(E) snd\_seq\_dummy(E) snd\_hrtimer(E) snd\_seq(E) snd\_timer(E) snd\_seq\_device(E) snd(E) soundcore(E) rfkill(E) qrtr(E) vfat(E) fat(E) ipmi\_ssif(E) amd\_atl(E) intel\_rapl\_msr(E) intel\_rapl\_common(E) mlx5\_ib(E) amd64\_edac(E) edac\_mce\_amd(E) kvm\_amd(E) ib\_uverbs(E) kvm(E) ib\_core(E) acpi\_ipmi(E) ipmi\_si(E) mxm\_wmi(E) ipmi\_devintf(E) rapl(E) i2c\_piix4(E) wmi\_bmof(E) joydev(E) ptdma(E) acpi\_cpufreq(E) k10temp(E) pcspkr(E) ipmi\_msghandler(E) xfs(E) libcrc32c(E) ast(E) i2c\_algo\_bit(E) crct10dif\_pclmul(E) drm\_shmem\_helper(E) nvme\_tcp(E) crc32\_pclmul(E) ahci(E) drm\_kms\_helper(E) libahci(E) nvme\_fabrics(E) crc32c\_intel(E) nvme(E) cdc\_ether(E) mlx5\_core(E) nvme\_core(E) usbnet(E) drm(E) libata(E) ccp(E) ghash\_clmulni\_intel(E) mii(E) t10\_pi(E) mlxfw(E) sp5100\_tco(E) psample(E) pci\_hyperv\_intf(E) wmi(E) dm\_multipath(E) sunrpc(E) dm\_mirror(E) dm\_region\_hash(E) dm\_log(E) dm\_mod(E) be2iscsi(E) bnx2i(E) cnic(E) uio(E) cxgb4i(E) cxgb4(E) tls(E) libcxgbi(E) libcxgb(E) qla4xxx(E)
\[  549.225752\]  iscsi\_boot\_sysfs(E) iscsi\_tcp(E) libiscsi\_tcp(E) libiscsi(E) scsi\_transport\_iscsi(E) fuse(E) \[last unloaded: gsp\_log(E)\]
\[  549.326293\] CPU: 8 PID: 6314 Comm: insmod Tainted: G            E      6.9.0-rc6+ \#1
\[  549.334039\] Hardware name: ASRockRack 1U1G-MILAN/N/ROMED8-NL, BIOS L3.12E 09/06/2022
\[  549.341781\] RIP: 0010:r535\_gsp\_msgq\_wait+0xd0/0x190 \[nvkm\]
\[  549.347343\] Code: 08 00 00 89 da c1 e2 0c 48 8d ac 11 00 10 00 00 48 8b 0c 24 48 85 c9 74 1f c1 e0 0c 4c 8d 6d 30 83 e8 30 89 01 e9 68 ff ff ff \<0f\> 0b 49 c7 c5 92 ff ff ff e9 5a ff ff ff ba ff ff ff ff be c0 0c
\[  549.366090\] RSP: 0018:ffffacbccaaeb7d0 EFLAGS: 00010246
\[  549.371315\] RAX: 0000000000000000 RBX: 0000000000000012 RCX: 0000000000923e28
\[  549.378451\] RDX: 0000000000000000 RSI: 0000000055555554 RDI: ffffacbccaaeb730
\[  549.385590\] RBP: 0000000000000001 R08: ffff8bd14d235f70 R09: ffff8bd14d235f70
\[  549.392721\] R10: 0000000000000002 R11: ffff8bd14d233864 R12: 0000000000000020
\[  549.399854\] R13: ffffacbccaaeb818 R14: 0000000000000020 R15: ffff8bb298c67000
\[  549.406988\] FS:  00007f5179244740(0000) GS:ffff8bd14d200000(0000) knlGS:0000000000000000
\[  549.415076\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  549.420829\] CR2: 00007fa844000010 CR3: 00000001567dc005 CR4: 0000000000770ef0
\[  549.427963\] PKRU: 55555554
\[  549.430672\] Call Trace:
\[  549.433126\]  \<TASK\>
\[  549.435233\]  ? \_\_warn+0x7f/0x130
\[  549.438473\]  ? r535\_gsp\_msgq\_wait+0xd0/0x190 \[nvkm\]
\[  549.443426\]  ? report\_bug+0x18a/0x1a0
\[  549.447098\]  ? handle\_bug+0x3c/0x70
\[  549.450589\]  ? exc\_invalid\_op+0x14/0x70
\[  549.454430\]  ? asm\_exc\_invalid\_op+0x16/0x20
\[  549.458619\]  ? r535\_gsp\_msgq\_wait+0xd0/0x190 \[nvkm\]
\[  549.463565\]  r535\_gsp\_msg\_recv+0x46/0x230 \[nvkm\]
\[  549.468257\]  r535\_gsp\_rpc\_push+0x106/0x160 \[nvkm\]
\[  549.473033\]  r535\_gsp\_rpc\_rm\_ctrl\_push+0x40/0x130 \[nvkm\]
\[  549.478422\]  nvidia\_grid\_init\_vgpu\_types+0xbc/0xe0 \[nvkm\]
\[  549.483899\]  nvidia\_grid\_init+0xb1/0xd0 \[nvkm\]
\[  549.488420\]  ? srso\_alias\_return\_thunk+0x5/0xfbef5
\[  549.493213\]  nvkm\_device\_pci\_probe+0x305/0x420 \[nvkm\]
\[  549.498338\]  local\_pci\_probe+0x46/
---truncated---

## Affected and fixed versions

- Linux: \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 56e6c7f6d2a6b4e0aae0528c502e56825bb40598; \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 6b6b75728c86f60c1fc596f0d4542427d0e6065b; \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 01ed662bdd6fce4f59c1804b334610d710d79fa0 (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- Upgrade Linux to 01ed662bdd6fce4f59c1804b334610d710d79fa0 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-58018.md
Affected: Linux >= 176fdcbddfd288408ce8571c1760ad618d962096, < 56e6c7f6d2a6b4e0aae0528c502e56825bb40598; >= 176fdcbddfd288408ce8571c1760ad618d962096, < 6b6b75728c86f60c1fc596f0d4542427d0e6065b; >= 176fdcbddfd288408ce8571c1760ad618d962096, < 01ed662bdd6fce4f59c1804b334610d710d79fa0; Linux 6.7
Fixed in: Linux 56e6c7f6d2a6b4e0aae0528c502e56825bb40598, Linux 6b6b75728c86f60c1fc596f0d4542427d0e6065b, Linux 01ed662bdd6fce4f59c1804b334610d710d79fa0

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-2024-58018 being exploited?

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

### How serious is CVE-2024-58018?

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

### Which versions are affected by CVE-2024-58018?

Linux \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 56e6c7f6d2a6b4e0aae0528c502e56825bb40598; \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 6b6b75728c86f60c1fc596f0d4542427d0e6065b; \>= 176fdcbddfd288408ce8571c1760ad618d962096, \< 01ed662bdd6fce4f59c1804b334610d710d79fa0; Linux 6.7.

### Is there a fix for CVE-2024-58018?

Yes. Fixed in Linux 56e6c7f6d2a6b4e0aae0528c502e56825bb40598, Linux 6b6b75728c86f60c1fc596f0d4542427d0e6065b, Linux 01ed662bdd6fce4f59c1804b334610d710d79fa0. Upgrade Linux to 01ed662bdd6fce4f59c1804b334610d710d79fa0 or later.

### How do I check if I'm affected by CVE-2024-58018?

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/56e6c7f6d2a6b4e0aae0528c502e56825bb40598>
- patch: <https://git.kernel.org/stable/c/6b6b75728c86f60c1fc596f0d4542427d0e6065b>
- patch: <https://git.kernel.org/stable/c/01ed662bdd6fce4f59c1804b334610d710d79fa0>

## 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-2024-58018>

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