af_netlink: Fix shift out of bounds in group mask calculation in Kernel
Summary
GSD-2022-1001194: af_netlink: Fix shift out of bounds in group mask calculation. Affects Kernel versions >= f7fa9b10edbb9391bdd4ec8e8b3d621d0664b198, < e23e1e981247feb3c7d0236fe58aceb685f234ae. 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 Kernel is a crucial component of the Linux operating system that provides core functionalities and interfaces between hardware and software. It manages system resources, facilitates communication between processes, and handles device drivers. The af_netlink module is responsible for communication between the kernel and user-space processes using Netlink sockets. It allows processes to send and receive messages to and from the kernel. However, a vulnerability has been discovered in the group mask calculation of af_netlink, which could lead to potential security risks.
Vulnerability Detail
The vulnerability in af_netlink arises from a shift out of bounds in the group mask calculation. This issue was introduced in version v2.6.14 of the Linux Kernel by commit f7fa9b10edbb9391bdd4ec8e8b3d621d0664b198. It was fixed in version v5.17.2 by commit e23e1e981247feb3c7d0236fe58aceb685f234ae. The vulnerability could potentially be exploited by an attacker to execute arbitrary code or cause a denial-of-service (DoS) condition. The impact and attack plausibility have not been proven yet.
How To Fix
No fixed version is published for this vulnerability.
To fix this vulnerability, it is recommended to update the Linux Kernel to version v5.17.2 or later. This can be done by obtaining the latest stable version of the Kernel from the official Git repository (https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/) and following the installation instructions provided by the Kernel documentation.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, users can apply the following patch to mitigate the vulnerability:
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -123,7 +123,7 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr, int addr_len
struct netlink_sock *nlk = nlk_sk(sock->sk);
struct net *net = sock_net(sock->sk);
struct netlink_table *table;
- int group;
+ unsigned int group;
if (addr_len < sizeof(struct sockaddr_nl))
return -EINVAL;
Conclusion
In conclusion, the af_netlink vulnerability in the Kernel could potentially allow an attacker to execute arbitrary code or cause a denial-of-service (DoS) condition. It is recommended to update the Linux Kernel to version v5.17.2 or later to mitigate this vulnerability. If you need further assistance or support in addressing this vulnerability, please reach out to DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The impact of this vulnerability could potentially allow an attacker to execute arbitrary code or cause a denial-of-service (DoS) condition.
You can use Vulert's playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. Simply upload your package-lock.json file, and Vulert will analyze it in real-time to identify any open-source vulnerabilities, including this one.
Yes, a temporary workaround is available. You can apply the provided patch to mitigate the vulnerability until you can update your Linux Kernel to the fixed version.
To fix this vulnerability, you should update your Linux Kernel to version v5.17.2 or later. You can obtain the latest stable version from the official Git repository and follow the installation instructions provided by the Kernel documentation.
You can find more information about this vulnerability in the official Linux Kernel security advisory or by contacting the Linux Kernel development team.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.