Linux Kernel up to 5.19.16/6.0.2 fortify __compiletime_strlen control flow

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 4.4 | $0-$5k | 0.00 |
Summary
A vulnerability marked as critical has been reported in Linux Kernel up to 5.19.16/6.0.2. Affected by this issue is the function __compiletime_strlen of the component fortify. This manipulation causes control flow.
This vulnerability is handled as CVE-2022-50778. There is not any exploit available.
It is suggested to upgrade the affected component.
Details
A vulnerability has been found in Linux Kernel up to 5.19.16/6.0.2 and classified as critical. Affected by this vulnerability is the function __compiletime_strlen of the component fortify. The manipulation with an unknown input leads to a control flow vulnerability. The CWE definition for the vulnerability is CWE-670. The code contains a control flow path that does not reflect the algorithm that the path is intended to implement, leading to incorrect behavior any time this path is navigated. The impact remains unknown. The summary by CVE is:
In the Linux kernel, the following vulnerability has been resolved: fortify: Fix __compiletime_strlen() under UBSAN_BOUNDS_LOCAL With CONFIG_FORTIFY=y and CONFIG_UBSAN_LOCAL_BOUNDS=y enabled, we observe a runtime panic while running Android's Compatibility Test Suite's (CTS) android.hardware.input.cts.tests. This is stemming from a strlen() call in hidinput_allocate(). __compiletime_strlen() is implemented in terms of __builtin_object_size(), then does an array access to check for NUL-termination. A quirk of __builtin_object_size() is that for strings whose values are runtime dependent, __builtin_object_size(str, 1 or 0) returns the maximum size of possible values when those sizes are determinable at compile time. Example: static const char *v = "FOO BAR"; static const char *y = "FOO BA"; unsigned long x (int z) { // Returns 8, which is: // max(__builtin_object_size(v, 1), __builtin_object_size(y, 1)) return __builtin_object_size(z ? v : y, 1); } So when FORTIFY_SOURCE is enabled, the current implementation of __compiletime_strlen() will try to access beyond the end of y at runtime using the size of v. Mixed with UBSAN_LOCAL_BOUNDS we get a fault. hidinput_allocate() has a local C string whose value is control flow dependent on a switch statement, so __builtin_object_size(str, 1) evaluates to the maximum string length, making all other cases fault on the last character check. hidinput_allocate() could be cleaned up to avoid runtime calls to strlen() since the local variable can only have literal values, so there's no benefit to trying to fortify the strlen call site there. Perform a __builtin_constant_p() check against index 0 earlier in the macro to filter out the control-flow-dependant case. Add a KUnit test for checking the expected behavioral characteristics of FORTIFY_SOURCE internals.
It is possible to read the advisory at git.kernel.org. This vulnerability is known as CVE-2022-50778 since 12/24/2025. The exploitation appears to be difficult. Technical details of the vulnerability are known, but there is no available exploit. The pricing for an exploit might be around USD $0-$5k at the moment (estimation calculated on 04/22/2026).
The vulnerability scanner Nessus provides a plugin with the ID 279718 (Linux Distros Unpatched Vulnerability : CVE-2022-50778), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 5.19.17 or 6.0.3 eliminates this vulnerability. Applying the patch ed42391164e6839a48aaf4c53eefda516835e799/5d59ad2bfb35fccfe2ad5e8bb8801f6224d3f7d4/d07c0acb4f41cc42a0d97530946965b3e4fa68c1 is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.
The vulnerability is also documented in the databases at Tenable (279718) and CERT Bund (WID-SEC-2025-2929). Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
Affected
- Debian Linux
- Amazon Linux 2
- Red Hat Enterprise Linux
- Ubuntu Linux
- SUSE Linux
- Oracle Linux
- SUSE openSUSE
- Open Source Linux Kernel
Product
Type
Vendor
Name
Version
- 5.19.0
- 5.19.1
- 5.19.2
- 5.19.3
- 5.19.4
- 5.19.5
- 5.19.6
- 5.19.7
- 5.19.8
- 5.19.9
- 5.19.10
- 5.19.11
- 5.19.12
- 5.19.13
- 5.19.14
- 5.19.15
- 5.19.16
- 6.0.0
- 6.0.1
- 6.0.2
License
Website
- Vendor: https://www.kernel.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 4.6VulDB Meta Temp Score: 4.4
VulDB Base Score: 4.6
VulDB Temp Score: 4.4
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Control flowCWE: CWE-670
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Partially
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 279718
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2022-50778
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Kernel 5.19.17/6.0.3
Patch: ed42391164e6839a48aaf4c53eefda516835e799/5d59ad2bfb35fccfe2ad5e8bb8801f6224d3f7d4/d07c0acb4f41cc42a0d97530946965b3e4fa68c1
Timeline
12/24/2025 Advisory disclosed12/24/2025 CVE reserved
12/24/2025 VulDB entry created
04/22/2026 VulDB entry last update
Sources
Vendor: kernel.orgAdvisory: git.kernel.org
Status: Confirmed
CVE: CVE-2022-50778 (🔒)
GCVE (CVE): GCVE-0-2022-50778
GCVE (VulDB): GCVE-100-338251
CERT Bund: WID-SEC-2025-2929 - Linux Kernel: Mehrere Schwachstellen
Entry
Created: 12/24/2025 16:35Updated: 04/22/2026 10:23
Changes: 12/24/2025 16:35 (59), 12/29/2025 13:44 (2), 12/30/2025 01:32 (7), 04/22/2026 10:23 (1)
Complete: 🔍
Cache ID: 216::103
Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.