CVE-2024-26984: nouveau: fix instmem race condition around ptr stores

Published May 1, 2024
·
Updated

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

nouveau: fix instmem race condition around ptr stores

Running a lot of VK CTS in parallel against nouveau, once every few hours you might see something like this crash.

BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 8000000114e6e067 P4D 8000000114e6e067 PUD 109046067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 7 PID: 53891 Comm: deqp-vk Not tainted 6.8.0-rc6+ #27 Hardware name: Gigabyte Technology Co., Ltd. Z390 I AORUS PRO WIFI/Z390 I AORUS PRO WIFI-CF, BIOS F8 11/05/2021 RIP: 0010:gp100vmmpgtmem+0xe3/0x180 [nouveau] Code: c7 48 01 c8 49 89 45 58 85 d2 0f 84 95 00 00 00 41 0f b7 46 12 49 8b 7e 08 89 da 42 8d 2c f8 48 8b 47 08 41 83 c7 01 48 89 ee <48> 8b 40 08 ff d0 0f 1f 00 49 8b 7e 08 48 89 d9 48 8d 75 04 48 c1 RSP: 0000:ffffac20c5857838 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 00000000004d8001 RCX: 0000000000000001 RDX: 00000000004d8001 RSI: 00000000000006d8 RDI: ffffa07afe332180 RBP: 00000000000006d8 R08: ffffac20c5857ad0 R09: 0000000000ffff10 R10: 0000000000000001 R11: ffffa07af27e2de0 R12: 000000000000001c R13: ffffac20c5857ad0 R14: ffffa07a96fe9040 R15: 000000000000001c FS: 00007fe395eed7c0(0000) GS:ffffa07e2c980000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000011febe001 CR4: 00000000003706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace:

...

? gp100vmmpgtmem+0xe3/0x180 [nouveau] ? gp100vmmpgtmem+0x37/0x180 [nouveau] nvkmvmmiter+0x351/0xa20 [nouveau] ? pfxnvkmvmmrefptes+0x10/0x10 [nouveau] ? pfxgp100vmmpgtmem+0x10/0x10 [nouveau] ? pfxgp100vmmpgtmem+0x10/0x10 [nouveau] ? lockacquire+0x3ed/0x2170 ? pfxgp100vmmpgtmem+0x10/0x10 [nouveau] nvkmvmmptesgetmap+0xc2/0x100 [nouveau] ? pfxnvkmvmmrefptes+0x10/0x10 [nouveau] ? pfxgp100vmmpgtmem+0x10/0x10 [nouveau] nvkmvmmmaplocked+0x224/0x3a0 [nouveau]

Adding any sort of useful debug usually makes it go away, so I hand wrote the function in a line, and debugged the asm.

Every so often pt->memory->ptrs is NULL. This ptrs ptr is set in the nv50instobjacquire called from nvkmkmap.

If Thread A and Thread B both get to nv50instobjacquire around the same time, and Thread A hits the refcountset line, and in lockstep thread B succeeds at refcountincnotzero, there is a chance the ptrs value won't have been stored since refcountset is unordered. Force a memory barrier here, I picked smpmb, since we want it on all CPUs and it's write followed by a read.

v2: use paired smprmb/smpwmb.

Other sources

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

nouveau: fix instmem race condition around ptr stores

The Linux kernel CVE team has assigned CVE-2024-26984 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024050142-CVE-2024-26984-3028@gregkh/T

Red Hat

Affected Software

23 affected componentsFixes available
Linux Linux kernel>=4.15<4.19.313
Linux Linux kernel>=4.20<5.4.275
Linux Linux kernel>=5.5<5.10.216
Linux Linux kernel>=5.11<5.15.157
Linux Linux kernel>=5.16<6.1.88
Linux Linux kernel>=6.2<6.6.29
Linux Linux kernel>=6.7<6.8.8
Linux Linux kernel=6.9-rc1
Linux Linux kernel=6.9-rc2
Linux Linux kernel=6.9-rc3
Linux Linux kernel=6.9-rc4
Debian Debian Linux=10.0
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
redhat/kernel<5.15.157
5.15.157
redhat/kernel<6.1.88
6.1.88
redhat/kernel<6.6.29
6.6.29
redhat/kernel<6.8.8
6.8.8
redhat/kernel<6.9
6.9
Microsoft cbl2 hyperv-daemons 5.15.158.1-1
Microsoft azl3 hyperv-daemons 6.6.35.1-1
Microsoft cbl2 hyperv-daemons 5.15.153.1-1
Microsoft azl3 hyperv-daemons 6.6.22.1-2
Microsoft cbl2 hyperv-daemons 5.15.153.1-1

Event History

May 1, 2024
CVE Published
via MITRE·05:27 AM
Data Sourced
via MITRE·05:27 AM
Description
Data Sourced
via NVD·06:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·07:23 PM
DescriptionSeverityAffected Software
May 13, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Updated
via Microsoft·07:00 AM
Description
Jul 11, 2024
Data Sourced
via Launchpad·07:45 PM
Description
Apr 27, 2025
Data Sourced
via Ubuntu·12:16 AM
RemedyDescriptionSeverityAffected Software
May 13, 2025
Data Sourced
via Debian·12:20 AM
DescriptionAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-26984?

CVE-2024-26984 has been classified as a moderate severity vulnerability due to its potential to cause a kernel NULL pointer dereference.

2

How do I fix CVE-2024-26984?

To resolve CVE-2024-26984, update to the appropriate kernel versions provided by Red Hat or Debian as listed in the affected software section.

3

Which kernel versions are affected by CVE-2024-26984?

CVE-2024-26984 affects multiple kernel versions across Red Hat and Debian distributions, including versions up to 5.15.157 and specific versions in the 6.x series.

4

Is there a workaround for CVE-2024-26984?

Currently, there are no documented workarounds for CVE-2024-26984, making an upgrade to a patched kernel the best solution.

5

What systems are impacted by CVE-2024-26984?

CVE-2024-26984 impacts systems running vulnerable versions of the Linux kernel, particularly those utilizing the nouveau graphics driver.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203