CVE-2026-31521: module: Fix kernel panic when a symbol st_shndx is out of bounds

Published Apr 22, 2026
·
Updated

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

module: Fix kernel panic when a symbol stshndx is out of bounds

The module loader doesn't check for bounds of the ELF section index in simplifysymbols():

for (i = 1; i < symsec->shsize / sizeof(ElfSym); i++) { const char name = info->strtab + sym[i].stname;

switch (sym[i].stshndx) { case SHNCOMMON:

[...]

default: / Divert to percpu allocation if a percpu var. / if (sym[i].stshndx == info->index.pcpu) secbase = (unsigned long)modpercpu(mod); else / HERE --> / secbase = info->sechdrs[sym[i].stshndx].shaddr; sym[i].stvalue += secbase; break; } }

A symbol with an out-of-bounds stshndx value, for example 0xffff (known as SHNXINDEX or SHNHIRESERVE), may cause a kernel panic:

BUG: unable to handle page fault for address: ... RIP: 0010:simplifysymbols+0x2b2/0x480 ... Kernel panic - not syncing: Fatal exception

This can happen when module ELF is legitimately using SHNXINDEX or when it is corrupted.

Add a bounds check in simplifysymbols() to validate that stshndx is within the valid range before using it.

This issue was discovered due to a bug in llvm-objcopy, see relevant discussion for details [1].

[1] https://lore.kernel.org/linux-modules/20251224005752.201911-1-ihor.solodrai@linux.dev/

Affected Software

15 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=2.6.12.1<5.15.203
Linux Linux kernel>=5.16<6.1.168
Linux Linux kernel>=6.2<6.6.131
Linux Linux kernel>=6.7<6.12.80
Linux Linux kernel>=6.13<6.18.21
Linux Linux kernel>=6.19<6.19.11
Linux Linux kernel=2.6.12
Linux Linux kernel=2.6.12-rc2
Linux Linux kernel=2.6.12-rc3
Linux Linux kernel=2.6.12-rc4
Linux Linux kernel=2.6.12-rc5
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Microsoft azl3 kernel 6.6.130.1-3

Event History

Apr 22, 2026
CVE Published
via MITRE·01:54 PM
Data Sourced
via MITRE·01:54 PM
Description
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Apr 23, 2026
Data Sourced
via Microsoft·08:10 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:10 AM
Affected Software
Updated
via Microsoft·08:10 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2026-31521?

CVE-2026-31521 is classified as a moderate severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2026-31521?

To fix CVE-2026-31521, update your Linux kernel to the latest version where the vulnerability has been patched.

3

What systems are affected by CVE-2026-31521?

CVE-2026-31521 affects various versions of the Linux kernel across different distributions.

4

What are the potential impacts of CVE-2026-31521?

The potential impact of CVE-2026-31521 includes kernel panic and system crashes due to improper bounds checking.

5

Is CVE-2026-31521 exploitable remotely?

CVE-2026-31521 is considered not exploitably remotely, as it typically requires local access to trigger the kernel panic.

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