# CVE-2025-39787: soc: qcom: mdt\_loader: Ensure we don't read past the ELF header

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; 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.27% (percentile 12, 2026-11-26)
- **Published:** 2025-09-11T16:56:36.426Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< e1720eb32acf411c328af6a8c8f556c94535808e; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 0d59ce2bfc3bb13abe6240335a1bf7b96536d022; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 43d26997d88c4056fce0324e72f62556bc7e8e8d; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 981c845f29838e468a9bfa87f784307193a31297; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 87bfabb3b2f46827639173f143aa43f7cfc0a7e6; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 81278be4eb5f08ba2c68c3055893e61cc03727fe; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef
- Anyone running Linux 4.11

## Description

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

soc: qcom: mdt\_loader: Ensure we don't read past the ELF header

When the MDT loader is used in remoteproc, the ELF header is sanitized
beforehand, but that's not necessary the case for other clients.

Validate the size of the firmware buffer to ensure that we don't read
past the end as we iterate over the header. e\_phentsize and e\_shentsize
are validated as well, to ensure that the assumptions about step size in
the traversal are valid.

## Affected and fixed versions

- Linux: \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< e1720eb32acf411c328af6a8c8f556c94535808e; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 0d59ce2bfc3bb13abe6240335a1bf7b96536d022; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 43d26997d88c4056fce0324e72f62556bc7e8e8d; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 981c845f29838e468a9bfa87f784307193a31297; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 87bfabb3b2f46827639173f143aa43f7cfc0a7e6; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 81278be4eb5f08ba2c68c3055893e61cc03727fe; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef (cvelist)
- Linux: 4.11 (cvelist)

## Mitigation

- Upgrade Linux to 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39787.md
Affected: Linux >= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, < 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd; >= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, < e1720eb32acf411c328af6a8c8f556c94535808e; >= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, < 0d59ce2bfc3bb13abe6240335a1bf7b96536d022; >= 2aad40d911eeb7dcac91c66…
Fixed in: Linux 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd, Linux 0d59ce2bfc3bb13abe6240335a1bf7b96536d022, Linux 43d26997d88c4056fce0324e72f62556bc7e8e8d, Linux 981c845f29838e468a9bfa87f784307193a31297, Linux 87bfabb3b2f46827639173f143aa43f7cfc0a7e6, Linux 81278be4eb5f08ba2c68c3055893e61cc03727fe, Linux 9f996…

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-2025-39787 being exploited?

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

### How serious is CVE-2025-39787?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39787?

Linux \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< e1720eb32acf411c328af6a8c8f556c94535808e; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 0d59ce2bfc3bb13abe6240335a1bf7b96536d022; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 43d26997d88c4056fce0324e72f62556bc7e8e8d; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 981c845f29838e468a9bfa87f784307193a31297; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 87bfabb3b2f46827639173f143aa43f7cfc0a7e6; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 81278be4eb5f08ba2c68c3055893e61cc03727fe; \>= 2aad40d911eeb7dcac91c669f2762a28134f0eb1, \< 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef; Linux 4.11.

### Is there a fix for CVE-2025-39787?

Yes. Fixed in Linux 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd, Linux 0d59ce2bfc3bb13abe6240335a1bf7b96536d022, Linux 43d26997d88c4056fce0324e72f62556bc7e8e8d, Linux 981c845f29838e468a9bfa87f784307193a31297, Linux 87bfabb3b2f46827639173f143aa43f7cfc0a7e6, Linux 81278be4eb5f08ba2c68c3055893e61cc03727fe, Linux 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef. Upgrade Linux to 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef or later.

### How do I check if I'm affected by CVE-2025-39787?

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/1096eb63ecfc8df90b70cd068e6de0c2ff204dfd>
- patch: <https://git.kernel.org/stable/c/e1720eb32acf411c328af6a8c8f556c94535808e>
- patch: <https://git.kernel.org/stable/c/0d59ce2bfc3bb13abe6240335a1bf7b96536d022>
- patch: <https://git.kernel.org/stable/c/43d26997d88c4056fce0324e72f62556bc7e8e8d>
- patch: <https://git.kernel.org/stable/c/981c845f29838e468a9bfa87f784307193a31297>
- patch: <https://git.kernel.org/stable/c/87bfabb3b2f46827639173f143aa43f7cfc0a7e6>
- patch: <https://git.kernel.org/stable/c/81278be4eb5f08ba2c68c3055893e61cc03727fe>
- patch: <https://git.kernel.org/stable/c/9f9967fed9d066ed3dae9372b45ffa4f6fccfeef>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-032379.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-2025-39787>

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