CVE-2022-50486

Source
https://cve.org/CVERecord?id=CVE-2022-50486
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50486.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50486
Downstream
Published
2025-10-04T15:16:43.791Z
Modified
2026-04-11T12:44:57.488881Z
Summary
net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
Details

In the Linux kernel, the following vulnerability has been resolved:

net: ethernet: ti: Fix return type of netcpndostart_xmit()

With clang's kernel control flow integrity (kCFI, CONFIGCFICLANG), 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/netcpcore.c:1944:21: error: incompatible function pointer types initializing 'netdevtxt (*)(struct skbuff , struct netdevice *)' (aka 'enum netdevtx ()(struct skbuff *, struct netdevice *)') with an expression of type 'int (struct skbuff *, struct netdevice *)' [-Werror,-Wincompatible-function-pointer-types-strict] .ndostartxmit = netcpndostart_xmit, ^~~~~~~~~~~~~~~~~~~~ 1 error generated.

->ndostartxmit() in 'struct netdeviceops' expects a return type of 'netdevtxt', not 'int'. Adjust the return type of netcpndostart_xmit() to match the prototype's to resolve the warning and CFI failure.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50486.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
84640e27f23041d474c31d3362c3e2185ad68ec2
Fixed
a447479ea2cf35603b5739ea947885024b901222
Fixed
17bb9bdf701f3e811a9f4820b08b9538ade2641c
Fixed
d837d74eae077cc3ef9e191ba8535b5f602d4673
Fixed
dbe1a6b930ae9647e8ce0b684c903ac67d4398eb
Fixed
5b0b6553bf4ad3a435a57e02c68d6075f384e1be
Fixed
a413ebb6049edd881c6427cfa25a7efddd6a4f74
Fixed
765636e58ba505cfe4927eda7ee83791b1c6402a
Fixed
1e4953b826e12b31995564a459dbd4e9e4604a35
Fixed
63fe6ff674a96cfcfc0fa8df1051a27aa31c70b4

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50486.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
4.0.0
Fixed
4.9.337
Type
ECOSYSTEM
Events
Introduced
4.10.0
Fixed
4.14.303
Type
ECOSYSTEM
Events
Introduced
4.15.0
Fixed
4.19.270
Type
ECOSYSTEM
Events
Introduced
4.20.0
Fixed
5.4.229
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.163
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.86
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.0.16
Type
ECOSYSTEM
Events
Introduced
6.1.0
Fixed
6.1.2

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50486.json"