Linux: Double Free
CVE-2024-36940 is a high-severity double free vulnerability in Linux, with a CVSS 3.1 base score of 7.8 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, without any action from a user. The record lists versions 735f4c6b6771eafe336404c157ca683ad72a040d, cdaa171473d98962ae86f2a663d398fda2fbeefd, 288bc4aa75f150d6f1ee82dd43c6da1b438b6068 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.25% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to 735f4c6b6771eafe336404c157ca683ad72a040d or cdaa171473d98962ae86f2a663d398fda2fbeefd or 288bc4aa75f150d6f1ee82dd43c6da1b438b6068 or 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, whichever matches your release line, or a later version.
- Update RUGGEDCOM RST2428P to V3.1 or a later version.
- Update SCALANCE XCM-/XRM-/XCH-/XRH-300 family to V3.1 or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, 735f4c6b6771eafe336404c157ca683ad72a040d; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, cdaa171473d98962ae86f2a663d398fda2fbeefd; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, 288bc4aa75f150d6f1ee82dd43c6da1b438b6068; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, ac7d65795827dc0cf7662384ed27caf4066bd72e; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, 558c8039fdf596a584a92c171cbf3298919c448c; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, f9f1e321d53e4c5b666b66e5b43da29841fb55ba; 6118714275f0a313ecc296a87ed1af32d9691bed up to, but not including, 5038a66dad0199de60e5671603ea6623eb9e5c79; and 1 more ranges | 735f4c6b6771eafe336404c157ca683ad72a040d, cdaa171473d98962ae86f2a663d398fda2fbeefd, 288bc4aa75f150d6f1ee82dd43c6da1b438b6068, 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, ac7d65795827dc0cf7662384ed27caf4066bd72e, 558c8039fdf596a584a92c171cbf3298919c448c |
| Siemens | RUGGEDCOM RST2428P | before V3.1 | V3.1 |
| Siemens | SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family | Not specified in the record | Not stated |
| Siemens | SCALANCE XCM-/XRM-/XCH-/XRH-300 family | before V3.1 | V3.1 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | before V1.1.1 | V1.1.1 |
| Linux | Linux Kernel | 4.11 up to, but not including, 4.19.314; 4.20 up to, but not including, 5.4.276; 5.5 up to, but not including, 5.10.217; 5.11 up to, but not including, 5.15.159; 5.16 up to, but not including, 6.1.91; 6.2 up to, but not including, 6.6.31; 6.7 up to, but not including, 6.8.10; 6.9 | 4.19.314, 5.4.276, 5.10.217, 5.15.159, 6.1.91, 6.6.31 |
| Debian | Debian Linux | 10.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.8 | High | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Double Free
The product calls free() twice on the same memory address.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
- Use a static analysis tool to find double free instances.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/288bc4aa75f150d6f1ee82dd43c6da1b438b6068
- git.kernel.org/stable/c/41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca
- git.kernel.org/stable/c/5038a66dad0199de60e5671603ea6623eb9e5c79
- git.kernel.org/stable/c/558c8039fdf596a584a92c171cbf3298919c448c
- git.kernel.org/stable/c/735f4c6b6771eafe336404c157ca683ad72a040d
- git.kernel.org/stable/c/ac7d65795827dc0cf7662384ed27caf4066bd72e
- git.kernel.org/stable/c/cdaa171473d98962ae86f2a663d398fda2fbeefd
- git.kernel.org/stable/c/f9f1e321d53e4c5b666b66e5b43da29841fb55ba
Other references
Recent Double Free vulnerabilities
- 7.1 High severity
- 8.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.