# CVE-2026-31521: module: Fix kernel panic when a symbol st\_shndx is out of bounds

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 4, 2026-11-28)
- **CWE:** CWE-787
- **Published:** 2026-04-22T13:54:36.211Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 5d16f519b6eb1d071807e57efe0df2baa8d32ad6; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 4bbdb0e48176fd281c2b9a211b110db6fd94e175; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 082f15d2887329e0f43fd3727e69365f5bfe5d2c; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ec2b22a58073f80739013588af448ff6e2ab906f; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ef75dc1401d8e797ee51559a0dd0336c225e1776; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6ba6957c640f58dc8ef046981a045da43e47ea23; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< f9d69d5e7bde2295eb7488a56f094ac8f5383b92
- Anyone running Linux 2.6.12

## Description

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

module: Fix kernel panic when a symbol st\_shndx is out of bounds

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

       for (i = 1; i \< symsec-\>sh\_size / sizeof(Elf\_Sym); i++) {
		const char \*name = info-\>strtab + sym\[i\].st\_name;

		switch (sym\[i\].st\_shndx) {
		case SHN\_COMMON:

		\[...\]

		default:
			/\* Divert to percpu allocation if a percpu var. \*/
			if (sym\[i\].st\_shndx == info-\>index.pcpu)
				secbase = (unsigned long)mod\_percpu(mod);
			else
  /\*\* HERE --\> \*\*/		secbase = info-\>sechdrs\[sym\[i\].st\_shndx\].sh\_addr;
			sym\[i\].st\_value += secbase;
			break;
		}
	}

A symbol with an out-of-bounds st\_shndx value, for example 0xffff
(known as SHN\_XINDEX or SHN\_HIRESERVE), may cause a kernel panic:

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

This can happen when module ELF is legitimately using SHN\_XINDEX or
when it is corrupted.

Add a bounds check in simplify\_symbols() to validate that st\_shndx 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 and fixed versions

- Linux: \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 5d16f519b6eb1d071807e57efe0df2baa8d32ad6; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 4bbdb0e48176fd281c2b9a211b110db6fd94e175; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 082f15d2887329e0f43fd3727e69365f5bfe5d2c; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ec2b22a58073f80739013588af448ff6e2ab906f; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ef75dc1401d8e797ee51559a0dd0336c225e1776; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6ba6957c640f58dc8ef046981a045da43e47ea23; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< f9d69d5e7bde2295eb7488a56f094ac8f5383b92 (cvelist)
- Linux: 2.6.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-31521. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-31521.md
Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 5d16f519b6eb1d071807e57efe0df2baa8d32ad6; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 4bbdb0e48176fd281c2b9a211b110db6fd94e175; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 082f15d2887329e0f43fd3727e69365f5bfe5d2c; >= 1da177e4c3f41524e886b7f…
Fixed in: Linux 5d16f519b6eb1d071807e57efe0df2baa8d32ad6, Linux 4bbdb0e48176fd281c2b9a211b110db6fd94e175, Linux 082f15d2887329e0f43fd3727e69365f5bfe5d2c, Linux 6ba6957c640f58dc8ef046981a045da43e47ea23

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-31521 being exploited?

There is no confirmed exploitation: CVE-2026-31521 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-31521?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-31521?

Linux \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 5d16f519b6eb1d071807e57efe0df2baa8d32ad6; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 4bbdb0e48176fd281c2b9a211b110db6fd94e175; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 082f15d2887329e0f43fd3727e69365f5bfe5d2c; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ec2b22a58073f80739013588af448ff6e2ab906f; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< ef75dc1401d8e797ee51559a0dd0336c225e1776; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< 6ba6957c640f58dc8ef046981a045da43e47ea23; \>= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, \< f9d69d5e7bde2295eb7488a56f094ac8f5383b92; Linux 2.6.12.

### Is there a fix for CVE-2026-31521?

Yes. Fixed in Linux 5d16f519b6eb1d071807e57efe0df2baa8d32ad6, Linux 4bbdb0e48176fd281c2b9a211b110db6fd94e175, Linux 082f15d2887329e0f43fd3727e69365f5bfe5d2c, Linux 6ba6957c640f58dc8ef046981a045da43e47ea23. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-31521?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/5d16f519b6eb1d071807e57efe0df2baa8d32ad6>
- patch: <https://git.kernel.org/stable/c/4bbdb0e48176fd281c2b9a211b110db6fd94e175>
- patch: <https://git.kernel.org/stable/c/082f15d2887329e0f43fd3727e69365f5bfe5d2c>
- patch: <https://git.kernel.org/stable/c/ec2b22a58073f80739013588af448ff6e2ab906f>
- patch: <https://git.kernel.org/stable/c/ef75dc1401d8e797ee51559a0dd0336c225e1776>
- patch: <https://git.kernel.org/stable/c/6ba6957c640f58dc8ef046981a045da43e47ea23>
- patch: <https://git.kernel.org/stable/c/f9d69d5e7bde2295eb7488a56f094ac8f5383b92>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-31521>

HTML: <https://flawdb.com/CVE-2026-31521> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-31521>
