---
id: CVE-2021-38166
title: >-
  In kernel/bpf/hashtab.c in the Linux kernel through 5.13.8, there is an
  integer overflow and out-of-bounds write when many elements are placed in a
  single bucket
summary: >-
  In kernel/bpf/hashtab.c in the Linux kernel through 5.13.8, there is an
  integer overflow and out-of-bounds write when many elements are placed in a
  single bucket. NOTE: exploitation might be impractical without the
  CAP_SYS_ADMIN capability.
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-190
  - CWE-787
vendor: linux
product: linux_kernel
affected:
  - 'linux_kernel >= 5.6, < 5.10.60'
  - 'linux_kernel >= 5.11, < 5.13.12'
  - fedora = 33
  - fedora = 34
  - debian_linux = 11.0
patched:
  - linux_kernel 5.13.12
published: '2021-08-07'
updated: '2026-08-05'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2021-38166'
references:
  - url: >-
      https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=c4eb1f403243fc7bbb7de644db8587c03de36da6
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GUVLBJKZMWA3E3YXSH4SZ7BOYGJP4GXP/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UL6CH5M5PRLMA3KPBX4LPUO6Z73GRISO/
    label: cve@mitre.org
  - url: >-
      https://lore.kernel.org/bpf/20210806150419.109658-1-th.yasumatsu%40gmail.com/
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20210909-0001/'
    label: cve@mitre.org
  - url: 'https://www.debian.org/security/2021/dsa-4978'
    label: cve@mitre.org
  - url: >-
      https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git/commit/?id=c4eb1f403243fc7bbb7de644db8587c03de36da6
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/GUVLBJKZMWA3E3YXSH4SZ7BOYGJP4GXP/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UL6CH5M5PRLMA3KPBX4LPUO6Z73GRISO/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lore.kernel.org/bpf/20210806150419.109658-1-th.yasumatsu%40gmail.com/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20210909-0001/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://www.debian.org/security/2021/dsa-4978'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
epss: 0.00315
epssPercentile: 0.2466
ingestedAt: '2026-08-05T18:50:24.844Z'
---

## Overview

In kernel/bpf/hashtab.c in the Linux kernel through 5.13.8, there is an integer overflow and out-of-bounds write when many elements are placed in a single bucket. NOTE: exploitation might be impractical without the CAP_SYS_ADMIN capability.

## Affected

- `linux_kernel >= 5.6, < 5.10.60`
- `linux_kernel >= 5.11, < 5.13.12`
- `fedora = 33`
- `fedora = 34`
- `debian_linux = 11.0`

## Remediation

Upgrade past the affected range:

- `linux_kernel 5.13.12`
