
Cloud Vulnerability DB
A community-led vulnerabilities database
In kernel/bpf/hashtab.c in the Linux kernel through 5.13.8, there is an integer overflow and out-of-bounds write vulnerability when many elements are placed in a single bucket. The vulnerability was discovered in August 2021 and assigned CVE-2021-38166. The issue affects the BPF subsystem in the Linux kernel and impacts systems running kernel versions up to 5.13.8 (NVD, Kernel Patch).
The vulnerability occurs in the _htabmaplookupanddeletebatch() function where hash buckets are iterated over to count elements. When elements' keys have the same jhash() value, they are placed in the same bucket. If bucket_size becomes large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in an out-of-bounds write. The vulnerability has been assigned a CVSS v3.1 Base Score of 7.8 (HIGH) with vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (NVD, NetApp Advisory).
Successful exploitation of this vulnerability could lead to disclosure of sensitive information, addition or modification of data, or Denial of Service (DoS). The severity is considered HIGH due to the potential for local attackers to cause system compromise, though exploitation requires local access and some privileges (NetApp Advisory).
The vulnerability was fixed by replacing kvmalloc() with kvmalloc_array() to properly handle memory allocation and prevent integer overflow. The fix was implemented in the Linux kernel patch c4eb1f403243. Distribution vendors have released updates to address this vulnerability, including Debian in DSA-4978-1 and Fedora in versions 5.13.10-100.fc33 and 5.13.10-200.fc34 (Kernel Patch, Debian Advisory, Fedora Update).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."