Linux: Out-of-bounds Write
CVE-2024-41042 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 1947e4c3346faa8ac7e343652c0fd3b3e394202f, cd4348e0a50286282c314ad6d2b0740e7c812c24, 31c35f9f89ef585f1edb53e17ac73a0ca4a9712b 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.32% 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 1947e4c3346faa8ac7e343652c0fd3b3e394202f or cd4348e0a50286282c314ad6d2b0740e7c812c24 or 31c35f9f89ef585f1edb53e17ac73a0ca4a9712b or 8246b7466c8da49d0d9e85e26cbd69dd6d3e3d1e, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.19.320 or 5.4.282 or 5.10.224 or 5.15.165, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, 1947e4c3346faa8ac7e343652c0fd3b3e394202f; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, cd4348e0a50286282c314ad6d2b0740e7c812c24; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, 31c35f9f89ef585f1edb53e17ac73a0ca4a9712b; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, 8246b7466c8da49d0d9e85e26cbd69dd6d3e3d1e; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, b6b6e430470e1c3c5513311cb35a15a205595abe; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, 717c91c6ed73e248de6a15bc53adefb81446c9d0; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, 9df785aeb7dcc8efd1d4110bb27d26005298ebae; 20a69341f2d00cd042e81c82289fba8a13c05a25 up to, but not including, cff3bd012a9512ac5ed858d38e6ed65f6391008c; and 1 more ranges | 1947e4c3346faa8ac7e343652c0fd3b3e394202f, cd4348e0a50286282c314ad6d2b0740e7c812c24, 31c35f9f89ef585f1edb53e17ac73a0ca4a9712b, 8246b7466c8da49d0d9e85e26cbd69dd6d3e3d1e, b6b6e430470e1c3c5513311cb35a15a205595abe, 717c91c6ed73e248de6a15bc53adefb81446c9d0 |
| Linux | Linux Kernel | 3.13 up to, but not including, 4.19.320; 4.20 up to, but not including, 5.4.282; 5.5 up to, but not including, 5.10.224; 5.11 up to, but not including, 5.15.165; 5.16 up to, but not including, 6.1.105; 6.2 up to, but not including, 6.6.46; 6.7 up to, but not including, 6.9.10; 6.10 | 4.19.320, 5.4.282, 5.10.224, 5.15.165, 6.1.105, 6.6.46 |
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: netfilter: nf_tables: prefer nft_chain_validate nft_chain_validate already performs loop detection because a cycle will result in a call stack overflow (ctx->level >= NFT_JUMP_STACK_SIZE). It also follows maps via ->validate callback in nft_lookup, so there appears no reason to iterate the maps again. nf_tables_check_loops() and all its helper functions can be removed. This improves ruleset load time significantly, from 23s down to 12s. This also fixes a crash bug. Old loop detection code can result in unbounded recursion: BUG: TASK stack guard page was hit at .... Oops: stack guard page: 0000 [#1] PREEMPT SMP KASAN CPU: 4 PID: 1539 Comm: nft Not tainted 6.10.0-rc5+ #1 [..] with a suitable ruleset during validation of register stores. I can't see any actual reason to attempt to check for this from nft_validate_register_store(), at this point the transaction is still in progress, so we don't have a full picture of the rule graph. For nf-next it might make sense to either remove it or make this depend on table->validate_state in case we could catch an error earlier (for improved error reporting to userspace).
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/1947e4c3346faa8ac7e343652c0fd3b3e394202f
- git.kernel.org/stable/c/31c35f9f89ef585f1edb53e17ac73a0ca4a9712b
- git.kernel.org/stable/c/717c91c6ed73e248de6a15bc53adefb81446c9d0
- git.kernel.org/stable/c/8246b7466c8da49d0d9e85e26cbd69dd6d3e3d1e
- git.kernel.org/stable/c/9df785aeb7dcc8efd1d4110bb27d26005298ebae
- git.kernel.org/stable/c/b6b6e430470e1c3c5513311cb35a15a205595abe
- git.kernel.org/stable/c/cd4348e0a50286282c314ad6d2b0740e7c812c24
- git.kernel.org/stable/c/cff3bd012a9512ac5ed858d38e6ed65f6391008c
Other references
Recent Out-of-bounds Write vulnerabilities
- 7.1 High severity
- 7.3 High severity
- 7.8 High severity
- 9.8 Critical severity
- 8.8 High severity
- 9.8 Critical severity
Spotted an error? Tell us.