CyberSecBulletin
CVE-2024-36940NVD status: Modified

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.

Next patch cycle

High severity with no evidence of exploitation so far.

What to do

  1. Update Linux to 735f4c6b6771eafe336404c157ca683ad72a040d or cdaa171473d98962ae86f2a663d398fda2fbeefd or 288bc4aa75f150d6f1ee82dd43c6da1b438b6068 or 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, whichever matches your release line, or a later version.
  2. Update RUGGEDCOM RST2428P to V3.1 or a later version.
  3. Update SCALANCE XCM-/XRM-/XCH-/XRH-300 family to V3.1 or a later version.

Affected products and versions

VendorProductAffected versionsFixed in
LinuxLinux6118714275f0a313ecc296a87ed1af32d9691bed 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 ranges735f4c6b6771eafe336404c157ca683ad72a040d, cdaa171473d98962ae86f2a663d398fda2fbeefd, 288bc4aa75f150d6f1ee82dd43c6da1b438b6068, 41f88ef8ba387a12f4a2b8c400b6c9e8e54b2cca, ac7d65795827dc0cf7662384ed27caf4066bd72e, 558c8039fdf596a584a92c171cbf3298919c448c
SiemensRUGGEDCOM RST2428Pbefore V3.1V3.1
SiemensSCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 familyNot specified in the recordNot stated
SiemensSCALANCE XCM-/XRM-/XCH-/XRH-300 familybefore V3.1V3.1
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystembefore V1.1.1V1.1.1
LinuxLinux Kernel4.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.94.19.314, 5.4.276, 5.10.217, 5.15.159, 6.1.91, 6.6.31
DebianDebian Linux10.0Not 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 systemScoreSeverityScored by
CVSS 3.17.8HighCNA
CVSS 3.17.8HighNVD

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.

More Double Free vulnerabilities (CWE-415)

Timeline

  1. CVE record published.
  2. CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
  3. Record last changed materially (score, affected products, status or references).

References

Recent Double Free vulnerabilities

Spotted an error? Tell us.