Linux: Double Free
CVE-2024-38627 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 6cc30ef8eb6d8f8d6df43152264bbf8835d99931, a0450d3f38e7c6c0a7c0afd4182976ee15573695, 713fc00c571dde4af3db2dbd5d1b0eadc327817b 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 6cc30ef8eb6d8f8d6df43152264bbf8835d99931 or a0450d3f38e7c6c0a7c0afd4182976ee15573695 or 713fc00c571dde4af3db2dbd5d1b0eadc327817b or 7419df1acffbcc90037f6b5a2823e81389659b36, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.19.316 or 5.4.278 or 5.10.219 or 5.15.161, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, 6cc30ef8eb6d8f8d6df43152264bbf8835d99931; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, a0450d3f38e7c6c0a7c0afd4182976ee15573695; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, 713fc00c571dde4af3db2dbd5d1b0eadc327817b; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, 7419df1acffbcc90037f6b5a2823e81389659b36; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, 4bfd48bb6e62512b9c392c5002c11e1e3b18d247; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, 370c480410f60b90ba3e96abe73ead21ec827b20; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, d782a2db8f7ac49c33b9ca3e835500a28667d1be; 389b6699a2aa0b457aa69986e9ddf39f3b4030fd up to, but not including, 3df463865ba42b8f88a590326f4c9ea17a1ce459; and 3 more ranges | 6cc30ef8eb6d8f8d6df43152264bbf8835d99931, a0450d3f38e7c6c0a7c0afd4182976ee15573695, 713fc00c571dde4af3db2dbd5d1b0eadc327817b, 7419df1acffbcc90037f6b5a2823e81389659b36, 4bfd48bb6e62512b9c392c5002c11e1e3b18d247, 370c480410f60b90ba3e96abe73ead21ec827b20 |
| Linux | Linux Kernel | 4.7 up to, but not including, 4.19.316; 4.20 up to, but not including, 5.4.278; 5.5 up to, but not including, 5.10.219; 5.11 up to, but not including, 5.15.161; 5.16 up to, but not including, 6.1.93; 6.2 up to, but not including, 6.6.33; 6.7 up to, but not including, 6.9.4 | 4.19.316, 5.4.278, 5.10.219, 5.15.161, 6.1.93, 6.6.33 |
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.
Official description
In the Linux kernel, the following vulnerability has been resolved: stm class: Fix a double free in stm_register_device() The put_device(&stm->dev) call will trigger stm_device_release() which frees "stm" so the vfree(stm) on the next line is a double free.
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/370c480410f60b90ba3e96abe73ead21ec827b20
- git.kernel.org/stable/c/3df463865ba42b8f88a590326f4c9ea17a1ce459
- git.kernel.org/stable/c/4bfd48bb6e62512b9c392c5002c11e1e3b18d247
- git.kernel.org/stable/c/6cc30ef8eb6d8f8d6df43152264bbf8835d99931
- git.kernel.org/stable/c/713fc00c571dde4af3db2dbd5d1b0eadc327817b
- git.kernel.org/stable/c/7419df1acffbcc90037f6b5a2823e81389659b36
- git.kernel.org/stable/c/a0450d3f38e7c6c0a7c0afd4182976ee15573695
- git.kernel.org/stable/c/d782a2db8f7ac49c33b9ca3e835500a28667d1be
Other references
Recent Double Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.1 High severity
- 8.8 High severity
- 7.8 High severity
Spotted an error? Tell us.