CVE-2022-50486
Description
A type confusion flaw was found in the Linux kernel's Texas Instruments NETCP Ethernet driver in the packet transmit function signature. A local user can trigger this issue on systems with kernel Control Flow Integrity enabled, where the incorrect return type of the ndo_start_xmit function causes CFI validation failures during indirect function calls. This results in either a kernel panic or thread termination, leading to denial of service.
Statement
The netcp_ndo_start_xmit function is declared with a return type of 'int' instead of the expected 'netdev_tx_t' enum. When CONFIG_CFI_CLANG is enabled, the kernel validates indirect function call targets against their expected prototypes to prevent control-flow hijacking attacks. The type mismatch causes CFI to reject the call, triggering either a kernel panic or killing the calling thread. This only affects systems compiled with Clang's CFI support enabled and running on Texas Instruments NETCP hardware. Without CFI enabled, the incorrect return type is harmless due to ABI compatibility between int and the enum.
Mitigation
To mitigate this issue, prevent the netcp_core module from being loaded. See https://access.redhat.com/solutions/41278 for instructions on blacklisting kernel modules.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 4.7 | 5.5 | N/A |
| Attack Vector | Local | Local | N/A |
| Attack Complexity | High | Low | N/A |
| Privileges Required | Low | Low | N/A |
| User Interaction | None | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | None | None | N/A |
| Integrity Impact | None | None | N/A |
| Availability Impact | High | High | N/A |
Vector
Red Hat: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Understanding the Weakness (CWE)
Availability,Integrity,Confidentiality
Technical Impact: Read Memory; Modify Memory; Execute Unauthorized Code or Commands; DoS: Crash, Exit, or Restart
When a memory buffer is accessed using the wrong type, it could read or write memory out of the bounds of the buffer, if the allocated buffer is smaller than the type that the code is attempting to access, leading to a crash and possibly code execution.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.