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

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2025-09-11T16:56:36.426Z
- Modified: 2026-10-19T21:10:00.160Z
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 1096eb63ecfc8df90b70cd068e6de0c2ff204dfd; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before e1720eb32acf411c328af6a8c8f556c94535808e; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 0d59ce2bfc3bb13abe6240335a1bf7b96536d022; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 43d26997d88c4056fce0324e72f62556bc7e8e8d; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 981c845f29838e468a9bfa87f784307193a31297; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 87bfabb3b2f46827639173f143aa43f7cfc0a7e6; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 81278be4eb5f08ba2c68c3055893e61cc03727fe; from 2aad40d911eeb7dcac91c669f2762a28134f0eb1 before 9f9967fed9d066ed3dae9372b45ffa4f6fccfeef; 4.11 (not affected: before 4.11; from 5.4.297 up to 5.4.*; from 5.10.241 up to 5.10.*; from 5.15.190 up to 5.15.*; from 6.1.149 up to 6.1.*; from 6.6.103 up to 6.6.*; from 6.12.44 up to 6.12.*; from 6.16.4 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 4.11 before 5.4.297; from 5.5 before 5.10.241; from 5.11 before 5.15.190; from 5.16 before 6.1.149; from 6.2 before 6.6.103; from 6.7 before 6.12.44; from 6.13 before 6.16.4
- debian debian_linux: 11.0

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <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> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (third-party-advisory)
- <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- <https://cert-portal.siemens.com/productcert/html/ssa-032379.html>

## Sources

- CVE List: [CVE-2025-39787](https://www.cve.org/CVERecord?id=CVE-2025-39787), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2025-39787](https://nvd.nist.gov/vuln/detail/CVE-2025-39787), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39787 · Whole record: https://cve.day/CVE-2025-39787.json · Rebuilt by cve.day 2026-11-25T22:59:04.567Z
