Linux: Out-of-bounds Write
CVE-2023-52836 is a high-severity out-of-bounds write 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 d4d37c9e6a4dbcca958dabd99216550525c7e389, d8267cabbe1bed15ccf8b0e684c528bf8eeef715, dcd85e3c929368076a7592b27f541e0da8b427f5 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.26% 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 d4d37c9e6a4dbcca958dabd99216550525c7e389 or d8267cabbe1bed15ccf8b0e684c528bf8eeef715 or dcd85e3c929368076a7592b27f541e0da8b427f5 or 9ed2d68b3925145f5f51c46559484881d6082f75, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.14.331 or 4.19.300 or 5.4.262 or 5.10.202, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, d4d37c9e6a4dbcca958dabd99216550525c7e389; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, d8267cabbe1bed15ccf8b0e684c528bf8eeef715; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, dcd85e3c929368076a7592b27f541e0da8b427f5; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, 9ed2d68b3925145f5f51c46559484881d6082f75; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, e89d0ed45a419c485bae999426ecf92697cbdda3; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, c56df79d68677cf062da1b6e3b33e74299a92dfc; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, e36407713163363e65566e7af0abe207d5f59a0c; 2a0c11282881875dc44f166a20eedf0d866dd0ef up to, but not including, 304a2c4aad0fff887ce493e4197bf9cbaf394479; and 2 more ranges | d4d37c9e6a4dbcca958dabd99216550525c7e389, d8267cabbe1bed15ccf8b0e684c528bf8eeef715, dcd85e3c929368076a7592b27f541e0da8b427f5, 9ed2d68b3925145f5f51c46559484881d6082f75, e89d0ed45a419c485bae999426ecf92697cbdda3, c56df79d68677cf062da1b6e3b33e74299a92dfc |
| Linux | Linux Kernel | before 4.14.331; 4.15 up to, but not including, 4.19.300; 4.20 up to, but not including, 5.4.262; 5.5 up to, but not including, 5.10.202; 5.11 up to, but not including, 5.15.140; 5.16 up to, but not including, 6.1.64; 6.2 up to, but not including, 6.5.13; 6.6 up to, but not including, 6.6.3 | 4.14.331, 4.19.300, 5.4.262, 5.10.202, 5.15.140, 6.1.64 |
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: locking/ww_mutex/test: Fix potential workqueue corruption In some cases running with the test-ww_mutex code, I was seeing odd behavior where sometimes it seemed flush_workqueue was returning before all the work threads were finished. Often this would cause strange crashes as the mutexes would be freed while they were being used. Looking at the code, there is a lifetime problem as the controlling thread that spawns the work allocates the "struct stress" structures that are passed to the workqueue threads. Then when the workqueue threads are finished, they free the stress struct that was passed to them. Unfortunately the workqueue work_struct node is in the stress struct. Which means the work_struct is freed before the work thread returns and while flush_workqueue is waiting. It seems like a better idea to have the controlling thread both allocate and free the stress structures, so that we can be sure we don't corrupt the workqueue by freeing the structure prematurely. So this patch reworks the test to do so, and with this change I no longer see the early flush_workqueue returns.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
How developers prevent this class of flaw
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega, and the Strsafe.h library from Microsoft. These libraries provide safer versions of overflow-prone string-handling functions.
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
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/304a2c4aad0fff887ce493e4197bf9cbaf394479
- git.kernel.org/stable/c/9ed2d68b3925145f5f51c46559484881d6082f75
- git.kernel.org/stable/c/bccdd808902f8c677317cec47c306e42b93b849e
- git.kernel.org/stable/c/c56df79d68677cf062da1b6e3b33e74299a92dfc
- git.kernel.org/stable/c/d4d37c9e6a4dbcca958dabd99216550525c7e389
- git.kernel.org/stable/c/d8267cabbe1bed15ccf8b0e684c528bf8eeef715
- git.kernel.org/stable/c/dcd85e3c929368076a7592b27f541e0da8b427f5
- git.kernel.org/stable/c/e36407713163363e65566e7af0abe207d5f59a0c
- git.kernel.org/stable/c/e89d0ed45a419c485bae999426ecf92697cbdda3
Recent Out-of-bounds Write vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 8.4 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.