Linux: Double Free
CVE-2024-35847 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 f5417ff561b8ac9a7e53c747b8627a7ab58378ae, b72d2b1448b682844f995e660b77f2a1fabc1662, aa44d21574751a7d6bca892eb8e0e9ac68372e52 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 f5417ff561b8ac9a7e53c747b8627a7ab58378ae or b72d2b1448b682844f995e660b77f2a1fabc1662 or aa44d21574751a7d6bca892eb8e0e9ac68372e52 or 5dbdbe1133911ca7d8466bb86885adec32ad9438, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.19.313 or 5.4.275 or 5.10.216 or 5.15.158, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, f5417ff561b8ac9a7e53c747b8627a7ab58378ae; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, b72d2b1448b682844f995e660b77f2a1fabc1662; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, aa44d21574751a7d6bca892eb8e0e9ac68372e52; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, 5dbdbe1133911ca7d8466bb86885adec32ad9438; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, dd681710ab77c8beafe2e263064cb1bd0e2d6ca9; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, 03170e657f62c26834172742492a8cb8077ef792; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, 5b012f77abde89bf0be8a0547636184fea618137; 7d75bbb4bc1ad90386776459d37e4ddfe605671e up to, but not including, c26591afd33adce296c022e3480dea4282b7ef91; and 1 more ranges | f5417ff561b8ac9a7e53c747b8627a7ab58378ae, b72d2b1448b682844f995e660b77f2a1fabc1662, aa44d21574751a7d6bca892eb8e0e9ac68372e52, 5dbdbe1133911ca7d8466bb86885adec32ad9438, dd681710ab77c8beafe2e263064cb1bd0e2d6ca9, 03170e657f62c26834172742492a8cb8077ef792 |
| Linux | Linux Kernel | 4.14 up to, but not including, 4.19.313; 4.20 up to, but not including, 5.4.275; 5.5 up to, but not including, 5.10.216; 5.11 up to, but not including, 5.15.158; 5.16 up to, but not including, 6.1.90; 6.2 up to, but not including, 6.6.30; 6.7 up to, but not including, 6.8.9; 6.9 | 4.19.313, 5.4.275, 5.10.216, 5.15.158, 6.1.90, 6.6.30 |
| 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: irqchip/gic-v3-its: Prevent double free on error The error handling path in its_vpe_irq_domain_alloc() causes a double free when its_vpe_init() fails after successfully allocating at least one interrupt. This happens because its_vpe_irq_domain_free() frees the interrupts along with the area bitmap and the vprop_page and its_vpe_irq_domain_alloc() subsequently frees the area bitmap and the vprop_page again. Fix this by unconditionally invoking its_vpe_irq_domain_free() which handles all cases correctly and by removing the bitmap/vprop_page freeing from its_vpe_irq_domain_alloc(). [ tglx: Massaged change log ]
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/03170e657f62c26834172742492a8cb8077ef792
- git.kernel.org/stable/c/5b012f77abde89bf0be8a0547636184fea618137
- git.kernel.org/stable/c/5dbdbe1133911ca7d8466bb86885adec32ad9438
- git.kernel.org/stable/c/aa44d21574751a7d6bca892eb8e0e9ac68372e52
- git.kernel.org/stable/c/b72d2b1448b682844f995e660b77f2a1fabc1662
- git.kernel.org/stable/c/c26591afd33adce296c022e3480dea4282b7ef91
- git.kernel.org/stable/c/dd681710ab77c8beafe2e263064cb1bd0e2d6ca9
- git.kernel.org/stable/c/f5417ff561b8ac9a7e53c747b8627a7ab58378ae
- lists.debian.org/debian-lts-announce/2024/06/msg00017.html
- lists.debian.org/debian-lts-announce/2024/06/msg00020.html
Recent Double Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 8.8 High severity
Spotted an error? Tell us.