# CVE-2024-36940: pinctrl: core: delete incorrect free in pinctrl\_enable()

> 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.34% (percentile 20, 2026-11-26)
- **CWE:** CWE-415
- **Published:** 2024-05-30T15:29:28.101Z
- **Modified:** 2026-10-15T01:18:26.347Z

## Who should check

- Anyone running Linux \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 735f4c6b6771eafe336404c157ca683ad72a040d; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< cdaa171473d98962ae86f2a663d398fda2fbeefd; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 288bc4aa75f150d6f1ee82dd43c6da1b438b6068; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< ac7d65795827dc0cf7662384ed27caf4066bd72e; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 558c8039fdf596a584a92c171cbf3298919c448c; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< f9f1e321d53e4c5b666b66e5b43da29841fb55ba; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 5038a66dad0199de60e5671603ea6623eb9e5c79
- Anyone running Linux 4.11

## Description

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

pinctrl: core: delete incorrect free in pinctrl\_enable()

The "pctldev" struct is allocated in devm\_pinctrl\_register\_and\_init().
It's a devm\_ managed pointer that is freed by devm\_pinctrl\_dev\_release(),
so freeing it in pinctrl\_enable() will lead to a double free.

The devm\_pinctrl\_dev\_release() function frees the pindescs and destroys
the mutex as well.

## Affected and fixed versions

- Linux: \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 735f4c6b6771eafe336404c157ca683ad72a040d; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< cdaa171473d98962ae86f2a663d398fda2fbeefd; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 288bc4aa75f150d6f1ee82dd43c6da1b438b6068; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< ac7d65795827dc0cf7662384ed27caf4066bd72e; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 558c8039fdf596a584a92c171cbf3298919c448c; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< f9f1e321d53e4c5b666b66e5b43da29841fb55ba; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 5038a66dad0199de60e5671603ea6623eb9e5c79 (cvelist)
- Linux: 4.11 (cvelist)

## Mitigation

- Upgrade Linux to 5038a66dad0199de60e5671603ea6623eb9e5c79 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-36940.md
Affected: Linux >= 6118714275f0a313ecc296a87ed1af32d9691bed, < 735f4c6b6771eafe336404c157ca683ad72a040d; >= 6118714275f0a313ecc296a87ed1af32d9691bed, < cdaa171473d98962ae86f2a663d398fda2fbeefd; >= 6118714275f0a313ecc296a87ed1af32d9691bed, < 288bc4aa75f150d6f1ee82dd43c6da1b438b6068; >= 6118714275f0a313ecc296a…
Fixed in: Linux 735f4c6b6771eafe336404c157ca683ad72a040d, Linux 288bc4aa75f150d6f1ee82dd43c6da1b438b6068, Linux 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, Linux 558c8039fdf596a584a92c171cbf3298919c448c, Linux 5038a66dad0199de60e5671603ea6623eb9e5c79

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-2024-36940 being exploited?

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

### How serious is CVE-2024-36940?

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

### Which versions are affected by CVE-2024-36940?

Linux \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 735f4c6b6771eafe336404c157ca683ad72a040d; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< cdaa171473d98962ae86f2a663d398fda2fbeefd; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 288bc4aa75f150d6f1ee82dd43c6da1b438b6068; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< ac7d65795827dc0cf7662384ed27caf4066bd72e; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 558c8039fdf596a584a92c171cbf3298919c448c; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< f9f1e321d53e4c5b666b66e5b43da29841fb55ba; \>= 6118714275f0a313ecc296a87ed1af32d9691bed, \< 5038a66dad0199de60e5671603ea6623eb9e5c79; Linux 4.11.

### Is there a fix for CVE-2024-36940?

Yes. Fixed in Linux 735f4c6b6771eafe336404c157ca683ad72a040d, Linux 288bc4aa75f150d6f1ee82dd43c6da1b438b6068, Linux 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, Linux 558c8039fdf596a584a92c171cbf3298919c448c, Linux 5038a66dad0199de60e5671603ea6623eb9e5c79. Upgrade Linux to 5038a66dad0199de60e5671603ea6623eb9e5c79 or later.

### How do I check if I'm affected by CVE-2024-36940?

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/735f4c6b6771eafe336404c157ca683ad72a040d>
- patch: <https://git.kernel.org/stable/c/cdaa171473d98962ae86f2a663d398fda2fbeefd>
- patch: <https://git.kernel.org/stable/c/288bc4aa75f150d6f1ee82dd43c6da1b438b6068>
- patch: <https://git.kernel.org/stable/c/41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca>
- patch: <https://git.kernel.org/stable/c/ac7d65795827dc0cf7662384ed27caf4066bd72e>
- patch: <https://git.kernel.org/stable/c/558c8039fdf596a584a92c171cbf3298919c448c>
- patch: <https://git.kernel.org/stable/c/f9f1e321d53e4c5b666b66e5b43da29841fb55ba>
- patch: <https://git.kernel.org/stable/c/5038a66dad0199de60e5671603ea6623eb9e5c79>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/06/msg00019.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-613116.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-2024-36940>

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