CVE-2024-26943

nouveau/dmem: handle kcalloc() allocation failure

State
Published
Severity
Not scored
Published
May 1, 2024
Updated
May 11, 2026
Reserved
Feb 19, 2024

Read the record on cve.org

Description

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

nouveau/dmem: handle kcalloc() allocation failure

The kcalloc() in nouveau_dmem_evict_chunk() will return null if the physical memory has run out. As a result, if we dereference src_pfns, dst_pfns or dma_addrs, the null pointer dereference bugs will happen.

Moreover, the GPU is going away. If the kcalloc() fails, we could not evict all pages mapping a chunk. So this patch adds a __GFP_NOFAIL flag in kcalloc().

Finally, as there is no need to have physically contiguous memory, this patch switches kcalloc() to kvcalloc() in order to avoid failing allocations.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 249881232e1471d28b68f9a3829acc14d150cf5d to before 9acfd8b083a0ffbd387566800d89f55058a68af2Affected
  • 249881232e1471d28b68f9a3829acc14d150cf5d to before 2a84744a037b8a511d6a9055f3defddc28ff4a4dAffected
  • 249881232e1471d28b68f9a3829acc14d150cf5d to before 5e81773757a95fc298e96cfd6d4700f07b6192a2Affected
  • 249881232e1471d28b68f9a3829acc14d150cf5d to before 3e82f7383e0b82a835e6b6b06a348b2bc4e2c2eeAffected
  • 249881232e1471d28b68f9a3829acc14d150cf5d to before 16e87fe23d4af6df920406494ced5c0f4354567bAffected
LinuxLinux
  • 6.1Affected
  • before 6.1Not affected
  • 6.1.84 through 6.1.*Not affected
  • 6.6.24 through 6.6.*Not affected
  • 6.7.12 through 6.7.*Not affected
  • 6.8.3 through 6.8.*Not affected
  • 6.9 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.