Linux: Out-of-bounds Write
CVE-2022-50301 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 706e359cf046c142db290244c3f4938b20fbe805, ec53b99b6b9da8b501f001595a6260c03b42d5b7, 648472df221f2bbffb433b964bcb87baccc586d8 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.19% 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 706e359cf046c142db290244c3f4938b20fbe805 or ec53b99b6b9da8b501f001595a6260c03b42d5b7 or 648472df221f2bbffb433b964bcb87baccc586d8 or 4010a1afaae1c0fb9c2cac5de703bed29b1f1782, whichever matches your release line, or a later version.
- Update Linux Kernel to 4.9.331 or 4.14.296 or 4.19.262 or 5.4.220, whichever matches your release line, or a later version.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, 706e359cf046c142db290244c3f4938b20fbe805; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, ec53b99b6b9da8b501f001595a6260c03b42d5b7; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, 648472df221f2bbffb433b964bcb87baccc586d8; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, 4010a1afaae1c0fb9c2cac5de703bed29b1f1782; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, 2fee0dbfaeaaa4bda04279ce772c4572b1429d04; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, 0c7043a5b5c3b35f5dc8875757f71e7f491d64d4; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, bd0438f534b2e31b12f0b39b355c5dc2bbdaf854; bd4396f09a4a9e77423e92ec9448217ab46f6edf up to, but not including, 9814cc350e0765ce69244bf55ae4c8b29facd27e; and 2 more ranges | 706e359cf046c142db290244c3f4938b20fbe805, ec53b99b6b9da8b501f001595a6260c03b42d5b7, 648472df221f2bbffb433b964bcb87baccc586d8, 4010a1afaae1c0fb9c2cac5de703bed29b1f1782, 2fee0dbfaeaaa4bda04279ce772c4572b1429d04, 0c7043a5b5c3b35f5dc8875757f71e7f491d64d4 |
| Linux | Linux Kernel | 3.19 up to, but not including, 4.9.331; 4.10 up to, but not including, 4.14.296; 4.15 up to, but not including, 4.19.262; 4.20 up to, but not including, 5.4.220; 5.5 up to, but not including, 5.10.150; 5.11 up to, but not including, 5.15.75; 5.16 up to, but not including, 5.19.17; 6.0 up to, but not including, 6.0.3 | 4.9.331, 4.14.296, 4.19.262, 5.4.220, 5.10.150, 5.15.75 |
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: iommu/omap: Fix buffer overflow in debugfs There are two issues here: 1) The "len" variable needs to be checked before the very first write. Otherwise if omap2_iommu_dump_ctx() with "bytes" less than 32 it is a buffer overflow. 2) The snprintf() function returns the number of bytes that *would* have been copied if there were enough space. But we want to know the number of bytes which were *actually* copied so use scnprintf() instead.
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.
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/0c7043a5b5c3b35f5dc8875757f71e7f491d64d4
- git.kernel.org/stable/c/184233a5202786b20220acd2d04ddf909ef18f29
- git.kernel.org/stable/c/2fee0dbfaeaaa4bda04279ce772c4572b1429d04
- git.kernel.org/stable/c/4010a1afaae1c0fb9c2cac5de703bed29b1f1782
- git.kernel.org/stable/c/648472df221f2bbffb433b964bcb87baccc586d8
- git.kernel.org/stable/c/706e359cf046c142db290244c3f4938b20fbe805
- git.kernel.org/stable/c/9814cc350e0765ce69244bf55ae4c8b29facd27e
- git.kernel.org/stable/c/bd0438f534b2e31b12f0b39b355c5dc2bbdaf854
- git.kernel.org/stable/c/ec53b99b6b9da8b501f001595a6260c03b42d5b7
Recent Out-of-bounds Write vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.