net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
Published Oct 4, 2025
5.5
MEDIUMCVSS 3.1
EPSS 0.16%
Description
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A proposed warning in clang aims to catch these at compile time, which reveals:
drivers/net/ethernet/ti/netcp_core.c:1944:21: error: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndo_start_xmit = netcp_ndo_start_xmit, ^~~~~~~~~~~~~~~~~~~~ 1 error generated.
->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of netcp_ndo_start_xmit() to match the prototype's to resolve the warning and CFI failure.
Affected products
-
Affected
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
-
Affected
- 4.0
Unaffected
- ≥ 0, < 4.0
- ≥ 4.14.303, ≤ 4.14.*
- ≥ 4.19.270, ≤ 4.19.*
- ≥ 4.9.337, ≤ 4.9.*
- ≥ 5.10.163, ≤ 5.10.*
- ≥ 5.15.86, ≤ 5.15.*
- ≥ 5.4.229, ≤ 5.4.*
- ≥ 6.0.16, ≤ 6.0.*
- ≥ 6.1.2, ≤ 6.1.*
- 6.2
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
| Vendor | Product | Default status | Versions |
|---|---|---|---|
| Linux | Linux | unaffected | Affected
|
| Linux | Linux | affected | Affected
Unaffected
|
- ≥ 4.0 · < 4.9.337
- ≥ 4.10 · < 4.14.303
- ≥ 4.15 · < 4.19.270
- ≥ 4.20 · < 5.4.229
- ≥ 5.5 · < 5.10.163
- ≥ 5.11 · < 5.15.86
- ≥ 5.16 · < 6.0.16
- ≥ 6.1 · < 6.1.2
No data.
Red Hat Enterprise Linux 9
kernel-0:5.14.0-503.11.1.el9_5
Fixed · RHSA-2024:9315
Red Hat Enterprise Linux 9
kernel-0:5.14.0-503.11.1.el9_5
Fixed · RHSA-2024:9315
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel-rt
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 9 | kernel-0:5.14.0-503.11.1.el9_5 | Fixed | RHSA-2024:9315 |
| Red Hat Enterprise Linux 9 | kernel-0:5.14.0-503.11.1.el9_5 | Fixed | RHSA-2024:9315 |
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
Red Hat 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.
Red Hat 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.
References (15)
- https://access.redhat.com/security/cve/CVE-2022-50486 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2401477 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-32368 Advisory
- https://git.kernel.org/stable/c/17bb9bdf701f3e811a9f4820b08b9538ade2641c Patch
- https://git.kernel.org/stable/c/1e4953b826e12b31995564a459dbd4e9e4604a35 Patch
- https://git.kernel.org/stable/c/5b0b6553bf4ad3a435a57e02c68d6075f384e1be Patch
- https://git.kernel.org/stable/c/63fe6ff674a96cfcfc0fa8df1051a27aa31c70b4 Patch
- https://git.kernel.org/stable/c/765636e58ba505cfe4927eda7ee83791b1c6402a Patch
- https://git.kernel.org/stable/c/a413ebb6049edd881c6427cfa25a7efddd6a4f74 Patch
- https://git.kernel.org/stable/c/a447479ea2cf35603b5739ea947885024b901222 Patch
- https://git.kernel.org/stable/c/d837d74eae077cc3ef9e191ba8535b5f602d4673 Patch
- https://git.kernel.org/stable/c/dbe1a6b930ae9647e8ce0b684c903ac67d4398eb Patch
- https://lore.kernel.org/linux-cve-announce/2025100441-CVE-2022-50486-da3d@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2022-50486
- https://www.cve.org/CVERecord?id=CVE-2022-50486
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
No data
GitHub
No data