CVE-2022-50564 in Linux
Summary
by MITRE • 10/22/2025
In the Linux kernel, the following vulnerability has been resolved:
s390/netiucv: Fix return type of netiucv_tx()
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/s390/net/netiucv.c:1854: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 = netiucv_tx, ^~~~~~~~~~
->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of netiucv_tx() to match the prototype's to resolve the warning and potential CFI failure, should s390 select ARCH_SUPPORTS_CFI_CLANG in the future.
Additionally, while in the area, remove a comment block that is no longer relevant.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 02/28/2026
The vulnerability CVE-2022-50564 addresses a critical type mismatch issue within the Linux kernel's s390 architecture network subsystem, specifically affecting the netiucv driver implementation. This flaw exists in the network device operations structure where the function pointer for the transmit operation does not conform to the expected prototype, creating a potential security risk through control flow integrity violations. The issue manifests when the kernel is compiled with clang's control flow integrity (kCFI) support, which enforces strict validation of indirect function calls to prevent return-oriented programming (ROP) attacks. The root cause lies in the incorrect return type declaration of the netiucv_tx() function, which should return netdev_tx_t according to the expected function pointer prototype but was incorrectly defined as returning int.
The technical implementation flaw occurs within the drivers/s390/net/netiucv.c file at line 1854, where the .ndo_start_xmit field of the net_device_ops structure is assigned the address of netiucv_tx() function. This assignment fails because the function signature does not match the expected prototype for network device transmit operations, which requires a return type of netdev_tx_t rather than int. This mismatch creates a compile-time warning that clang's kernel control flow integrity feature flags as an error, indicating an incompatible function pointer type that could lead to runtime failures including kernel panics or thread termination. The vulnerability represents a direct violation of the Common Weakness Enumeration (CWE) category CWE-688, which covers function call with incorrect object type, and aligns with ATT&CK technique T1059.001 for execution through system services and T1068 for privilege escalation through kernel exploits.
The operational impact of this vulnerability extends beyond simple compilation warnings, as it represents a potential security weakness in kernel code that could be exploited by attackers seeking to bypass control flow integrity protections. When the s390 architecture selects ARCH_SUPPORTS_CFI_CLANG configuration, the kernel's security posture becomes compromised due to the mismatch between expected and actual function signatures, potentially allowing attackers to craft more sophisticated exploits that rely on control flow manipulation. The vulnerability directly affects systems running Linux kernels on IBM z/Architecture systems where the netiucv driver is utilized for network communication, particularly in enterprise environments where kernel-level security controls are paramount. The fix requires adjusting the return type of netiucv_tx() to match the netdev_tx_t type expected by the network device operations interface, which ensures proper function signature alignment and maintains kernel security controls while preserving functionality.
The mitigation strategy involves correcting the function signature of netiucv_tx() to return netdev_tx_t instead of int, thereby resolving the type mismatch that triggers clang's kCFI validation. This change maintains compatibility with the existing network device interface while ensuring that the kernel's control flow integrity mechanisms operate correctly. Additionally, the patch removes outdated documentation comments that no longer reflect the current implementation, improving code clarity and maintainability. The solution follows established kernel development practices and security hardening guidelines, ensuring that the fix does not introduce regressions while strengthening the kernel's resistance to control flow based attacks. This vulnerability demonstrates the importance of maintaining strict type consistency in kernel code, particularly when employing advanced security features like kCFI that rely on precise function signature validation to protect against sophisticated exploitation techniques.