CVE-2024-58018

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-58018
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-58018.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-58018
Related
Published
2025-02-27T03:15:12Z
Modified
2025-03-10T05:52:49.455207Z
Downstream
Summary
[none]
Details

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

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

r535gspcmdq_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 r535gspmsgqwait+0xd0/0x190 [nvkm] [ 549.225678] Modules linked in: nvkm(E+) gsplog(E) sndseqdummy(E) sndhrtimer(E) sndseq(E) sndtimer(E) sndseqdevice(E) snd(E) soundcore(E) rfkill(E) qrtr(E) vfat(E) fat(E) ipmissif(E) amdatl(E) intelraplmsr(E) intelraplcommon(E) mlx5ib(E) amd64edac(E) edacmceamd(E) kvmamd(E) ibuverbs(E) kvm(E) ibcore(E) acpiipmi(E) ipmisi(E) mxmwmi(E) ipmidevintf(E) rapl(E) i2cpiix4(E) wmibmof(E) joydev(E) ptdma(E) acpicpufreq(E) k10temp(E) pcspkr(E) ipmimsghandler(E) xfs(E) libcrc32c(E) ast(E) i2calgobit(E) crct10difpclmul(E) drmshmemhelper(E) nvmetcp(E) crc32pclmul(E) ahci(E) drmkmshelper(E) libahci(E) nvmefabrics(E) crc32cintel(E) nvme(E) cdcether(E) mlx5core(E) nvmecore(E) usbnet(E) drm(E) libata(E) ccp(E) ghashclmulniintel(E) mii(E) t10pi(E) mlxfw(E) sp5100tco(E) psample(E) pcihypervintf(E) wmi(E) dmmultipath(E) sunrpc(E) dmmirror(E) dmregionhash(E) dmlog(E) dmmod(E) be2iscsi(E) bnx2i(E) cnic(E) uio(E) cxgb4i(E) cxgb4(E) tls(E) libcxgbi(E) libcxgb(E) qla4xxx(E) [ 549.225752] iscsibootsysfs(E) iscsitcp(E) libiscsitcp(E) libiscsi(E) scsitransportiscsi(E) fuse(E) [last unloaded: gsplog(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:r535gspmsgqwait+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] ? r535gspmsgqwait+0xd0/0x190 [nvkm] [ 549.443426] ? reportbug+0x18a/0x1a0 [ 549.447098] ? handlebug+0x3c/0x70 [ 549.450589] ? excinvalidop+0x14/0x70 [ 549.454430] ? asmexcinvalidop+0x16/0x20 [ 549.458619] ? r535gspmsgqwait+0xd0/0x190 [nvkm] [ 549.463565] r535gspmsgrecv+0x46/0x230 [nvkm] [ 549.468257] r535gsprpcpush+0x106/0x160 [nvkm] [ 549.473033] r535gsprpcrmctrlpush+0x40/0x130 [nvkm] [ 549.478422] nvidiagridinitvgputypes+0xbc/0xe0 [nvkm] [ 549.483899] nvidiagridinit+0xb1/0xd0 [nvkm] [ 549.488420] ? srsoaliasreturnthunk+0x5/0xfbef5 [ 549.493213] nvkmdevicepciprobe+0x305/0x420 [nvkm] [ 549.498338] localpci_probe+0x46/ ---truncated---

References

Affected packages

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.12.15-1

Affected versions

6.*

6.1.27-1
6.1.37-1
6.1.38-1
6.1.38-2~bpo11+1
6.1.38-2
6.1.38-3
6.1.38-4~bpo11+1
6.1.38-4
6.1.52-1
6.1.55-1~bpo11+1
6.1.55-1
6.1.64-1
6.1.66-1
6.1.67-1
6.1.69-1~bpo11+1
6.1.69-1
6.1.76-1~bpo11+1
6.1.76-1
6.1.82-1
6.1.85-1
6.1.90-1~bpo11+1
6.1.90-1
6.1.94-1~bpo11+1
6.1.94-1
6.1.98-1
6.1.99-1
6.1.106-1
6.1.106-2
6.1.106-3
6.1.112-1
6.1.115-1
6.1.119-1
6.1.123-1
6.1.124-1
6.1.128-1
6.1.129-1
6.3.1-1~exp1
6.3.2-1~exp1
6.3.4-1~exp1
6.3.5-1~exp1
6.3.7-1~bpo12+1
6.3.7-1
6.3.11-1
6.4~rc6-1~exp1
6.4~rc7-1~exp1
6.4.1-1~exp1
6.4.4-1~bpo12+1
6.4.4-1
6.4.4-2
6.4.4-3~bpo12+1
6.4.4-3
6.4.11-1
6.4.13-1
6.5~rc4-1~exp1
6.5~rc6-1~exp1
6.5~rc7-1~exp1
6.5.1-1~exp1
6.5.3-1~bpo12+1
6.5.3-1
6.5.6-1
6.5.8-1
6.5.10-1~bpo12+1
6.5.10-1
6.5.13-1
6.6.3-1~exp1
6.6.4-1~exp1
6.6.7-1~exp1
6.6.8-1
6.6.9-1
6.6.11-1
6.6.13-1~bpo12+1
6.6.13-1
6.6.15-1
6.6.15-2
6.7-1~exp1
6.7.1-1~exp1
6.7.4-1~exp1
6.7.7-1
6.7.9-1
6.7.9-2
6.7.12-1~bpo12+1
6.7.12-1
6.8.9-1
6.8.11-1
6.8.12-1~bpo12+1
6.8.12-1
6.9.2-1~exp1
6.9.7-1~bpo12+1
6.9.7-1
6.9.8-1
6.9.9-1
6.9.10-1~bpo12+1
6.9.10-1
6.9.11-1
6.9.12-1
6.10-1~exp1
6.10.1-1~exp1
6.10.3-1
6.10.4-1
6.10.6-1~bpo12+1
6.10.6-1
6.10.7-1
6.10.9-1
6.10.11-1~bpo12+1
6.10.11-1
6.10.12-1
6.11~rc4-1~exp1
6.11~rc5-1~exp1
6.11-1~exp1
6.11.2-1
6.11.4-1
6.11.5-1~bpo12+1
6.11.5-1
6.11.6-1
6.11.7-1
6.11.9-1
6.11.10-1~bpo12+1
6.11.10-1
6.12~rc6-1~exp1
6.12.3-1
6.12.5-1
6.12.6-1
6.12.8-1
6.12.9-1~bpo12+1
6.12.9-1
6.12.9-1+alpha
6.12.10-1
6.12.11-1
6.12.11-1+alpha
6.12.11-1+alpha.1
6.12.12-1~bpo12+1
6.12.12-1
6.12.13-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}