CVE-2026-64297: module: decompress: check return value of module_extend_max_pages()

Published Jul 25, 2026
·
Updated

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

module: decompress: check return value of moduleextendmaxpages()

moduleextendmaxpages() calls kvrealloc() internally and returns -ENOMEM on allocation failure. The return value is never checked.

If the initial allocation fails, info->pages remains NULL and info->maxpages remains 0. Subsequent calls to modulegetnextpage() will attempt to dynamically grow the array by calling moduleextendmaxpages(info, 0) since info->usedpages is 0. This results in kvrealloc(NULL, 0) returning ZEROSIZEPTR, which is treated as a success, leading to a dereference of ZEROSIZEPTR and a kernel oops.

Fix: add the missing error check after moduleextendmaxpages() and return immediately on failure. This matches the pattern used by every other kvrealloc() caller in the module loading path.

[Sami: Corrected the analysis in the commit message.]

Affected Software

6 affected components
Linux Linux kernel
Linux Linux kernel>=5.17<6.1.178
Linux Linux kernel>=6.2<6.6.145
Linux Linux kernel>=6.7<6.12.96
Linux Linux kernel>=6.13<6.18.39
Linux Linux kernel>=6.19<7.1.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In module: decompress, add the missing error check after module_extend_max_pages(); if the call fails and info->pages remains NULL (e.g., module_extend_max_pages(info, 0) after module_extend_max_pages() returns failure), ensure subsequent module_get_next_page() calls do not proceed and that the function returns immediately on failure.

    Linux kernel (module: decompress) module_extend_max_pages() return value handling = check return value after module_extend_max_pages() and return immediately on failure

Event History

Jul 25, 2026
CVE Published
via MITRE·08:49 AM
Data Sourced
via MITRE·08:49 AM
Description
Data Sourced
via NVD·10:17 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-64297?

The severity of CVE-2026-64297 is medium with a CVSS score of 5.5.

2

How do I fix CVE-2026-64297?

You can fix CVE-2026-64297 by applying the available patch provided in the Linux kernel updates.

3

What vulnerability does CVE-2026-64297 address?

CVE-2026-64297 addresses a vulnerability in the Linux kernel related to the unchecked return value of the module_extend_max_pages() function.

4

What are the potential consequences of CVE-2026-64297?

The potential consequences of CVE-2026-64297 include a null pointer dereference which could lead to system crashes or unexpected behavior.

5

When was CVE-2026-64297 published?

CVE-2026-64297 was published on July 25, 2026.

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