Linux: Use After Free
CVE-2023-53338 is a high-severity use after 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 67f8f2bae8e7ac72e09def2b667e44704c4d1ee1, a97f221651fcdc891166e9bc270e3d9bfa5a0080, e3f647e4b642f9f6d32795a16f92c116c138d2af 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.55% 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 67f8f2bae8e7ac72e09def2b667e44704c4d1ee1 or a97f221651fcdc891166e9bc270e3d9bfa5a0080 or e3f647e4b642f9f6d32795a16f92c116c138d2af or 065d5f17096ec9161180e2c890afdff4dc6125f2, whichever matches your release line, or a later version.
- Update Linux Kernel to 5.4.257 or 5.10.195 or 5.15.132 or 6.1.53, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, 67f8f2bae8e7ac72e09def2b667e44704c4d1ee1; 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, a97f221651fcdc891166e9bc270e3d9bfa5a0080; 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, e3f647e4b642f9f6d32795a16f92c116c138d2af; 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, 065d5f17096ec9161180e2c890afdff4dc6125f2; 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, d68c17402442f5f494a2c3ebde5cb82f6aa9160a; 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, 65583f9e070db7bece20710cfa2e3daeb0b831d9; 3a0af8fd61f90920f6fa04e4f1e9a6a73c1b4fd2 up to, but not including, 29b22badb7a84b783e3a4fffca16f7768fb31205; 4.10 | 67f8f2bae8e7ac72e09def2b667e44704c4d1ee1, a97f221651fcdc891166e9bc270e3d9bfa5a0080, e3f647e4b642f9f6d32795a16f92c116c138d2af, 065d5f17096ec9161180e2c890afdff4dc6125f2, d68c17402442f5f494a2c3ebde5cb82f6aa9160a, 65583f9e070db7bece20710cfa2e3daeb0b831d9 |
| Linux | Linux Kernel | 4.10 up to, but not including, 5.4.257; 5.5 up to, but not including, 5.10.195; 5.11 up to, but not including, 5.15.132; 5.16 up to, but not including, 6.1.53; 6.2 up to, but not including, 6.4.16; 6.5 up to, but not including, 6.5.3 | 5.4.257, 5.10.195, 5.15.132, 6.1.53, 6.4.16, 6.5.3 |
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 | 9.8 | Critical | CNA |
| CVSS 3.1 | 7.8 | High | NVD |
| CVSS 3.1 | 7.8 | High | CISA (ADP) |
Official description
In the Linux kernel, the following vulnerability has been resolved: lwt: Fix return values of BPF xmit ops BPF encap ops can return different types of positive values, such like NET_RX_DROP, NET_XMIT_CN, NETDEV_TX_BUSY, and so on, from function skb_do_redirect and bpf_lwt_xmit_reroute. At the xmit hook, such return values would be treated implicitly as LWTUNNEL_XMIT_CONTINUE in ip(6)_finish_output2. When this happens, skbs that have been freed would continue to the neighbor subsystem, causing use-after-free bug and kernel crashes. To fix the incorrect behavior, skb_do_redirect return values can be simply discarded, the same as tc-egress behavior. On the other hand, bpf_lwt_xmit_reroute returns useful errors to local senders, e.g. PMTU information. Thus convert its return values to avoid the conflict with LWTUNNEL_XMIT_CONTINUE.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/065d5f17096ec9161180e2c890afdff4dc6125f2
- git.kernel.org/stable/c/29b22badb7a84b783e3a4fffca16f7768fb31205
- git.kernel.org/stable/c/65583f9e070db7bece20710cfa2e3daeb0b831d9
- git.kernel.org/stable/c/67f8f2bae8e7ac72e09def2b667e44704c4d1ee1
- git.kernel.org/stable/c/a97f221651fcdc891166e9bc270e3d9bfa5a0080
- git.kernel.org/stable/c/d68c17402442f5f494a2c3ebde5cb82f6aa9160a
- git.kernel.org/stable/c/e3f647e4b642f9f6d32795a16f92c116c138d2af
Recent Use After Free vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.0 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.