CVE-2022-50486: net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
In the Linux kernel, the following vulnerability has been resolved:
net: ethernet: ti: Fix return type of netcpndostartxmit()
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 = netcpndostartxmit, ^~~~~~~~~~~~~~~~~~~~ 1 error generated.
->ndostartxmit() in 'struct netdeviceops' expects a return type of 'netdevtxt', not 'int'. Adjust the return type of netcpndostartxmit() to match the prototype's to resolve the warning and CFI failure.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-50486?
CVE-2022-50486 is considered a low severity vulnerability in the Linux kernel.
How do I fix CVE-2022-50486?
To fix CVE-2022-50486, upgrade to a patched version of the Linux kernel that resolves the vulnerability.
Which versions of the Linux kernel are affected by CVE-2022-50486?
CVE-2022-50486 affects specific versions of the Linux kernel prior to the security patch.
What type of vulnerability is CVE-2022-50486?
CVE-2022-50486 is related to the return type in the netcp_ndo_start_xmit function within the Linux kernel.
Is there any exploit available for CVE-2022-50486?
As of now, there is no publicly known exploit specifically targeting CVE-2022-50486.