net/smc: Fix NULL pointer dereferencing in smc_vlan_by_tcpsk()
Summary
GSD-2021-1002540: net/smc: Fix NULL pointer dereferencing in smc_vlan_by_tcpsk(). Affects Kernel versions >= cb9d43f6775457cac75544bc4197f26ac2b6f294, < bb851d0fb02547d03cd40106b5f2391c4fed6ed1. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The net/smc package is a part of the Linux Kernel ecosystem. It provides support for the SMC (System Management Controller) protocol, which enables communication between systems over a network. The smc_vlan_by_tcpsk() function is responsible for retrieving the VLAN ID associated with a given TCP socket. However, a vulnerability in this function allows for NULL pointer dereferencing, which can lead to a system crash or potential code execution.
Vulnerability Detail
The vulnerability in smc_vlan_by_tcpsk() arises from a lack of proper validation of the input parameters. An attacker can exploit this by providing a crafted TCP socket, causing the function to dereference a NULL pointer. This can result in a kernel panic or potentially allow the attacker to execute arbitrary code with kernel privileges. The vulnerability was introduced in version v4.18 of the Linux Kernel and has been fixed in version v5.15.6.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can disable the use of the SMC protocol or restrict access to the vulnerable function. However, these workarounds may impact the functionality of systems relying on the SMC protocol or limit certain network capabilities. It is recommended to apply the official fix as soon as possible.
Conclusion
The vulnerability in net/smc's smc_vlan_by_tcpsk() function can lead to system crashes or potential code execution. It is crucial to update the Linux Kernel to version v5.15.6 or later to mitigate this vulnerability. Users can also use the Vulert Playground (https://vulert.com/scanner) to check if their systems are affected and receive real-time alerts for open-source vulnerabilities. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can lead to a system crash (kernel panic) or allow an attacker to execute arbitrary code with kernel privileges.
You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground, and it will provide real-time alerts for open-source vulnerabilities.
At the time of this report, there is no known public exploit for this vulnerability. However, it is crucial to apply the fix promptly to mitigate any potential risks.
As mentioned in the workaround section, you can disable the use of the SMC protocol or restrict access to the vulnerable function. However, these measures may impact system functionality and should only be considered as temporary solutions.
You can refer to the vulnerability details in the GSD database (https://github.com/cloudsecurityalliance/gsd-database/blob/main/2021/1002xxx/GSD-2021-1002540.json) for more information and references.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.