Skip to content
Heist/ feed
Back to feed
HighFix available

bpf: Fix hashtab overflow check on 32-bit arches

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix hashtab overflow check on 32-bit arches The hashtab code relies on roundup_pow_of_two() to compute the number of hash buckets, and contains an overflow check by checking if the resulting value is 0. However, on 32-bit arches, the roundup code itself can overflow by doing a 32-bit left-shift of an unsigned long value, which is undefined behaviour, so it is not guaranteed to truncate neatly. This was triggered by syzbot on the DEVMAP_HASH type, which contains the same check, copied from the hashtab code. So apply the same fix to hashtab, by moving the overflow check to before the roundup.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.311, 5.10.214, 5.15.153, 5.4.273, 6.1.83, 6.6.23, 6.7.11, 6.8.2
CVEs
CVE-2024-26884
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 11:54 UTC · Revision 1

Source evidence

bpf: Fix hashtab overflow check on 32-bit arches

core-osv · Original source

Published 17 Apr 2024, 10:27 UTC

In the Linux kernel, the following vulnerability has been resolved: bpf: Fix hashtab overflow check on 32-bit arches The hashtab code relies on roundup_pow_of_two() to compute the number of hash buckets, and contains an overflow check by checking if the resulting value is 0. However, on 32-bit arches, the roundup code itself can overflow by doing a 32-bit left-shift of an unsigned long value, which is undefined behaviour, so it is not guaranteed to truncate neatly. This was triggered by syzbot on the DEVMAP_HASH type, which contains the same check, copied from the hashtab code. So apply the same fix to hashtab, by moving the overflow check to before the roundup.

osv:CVE-2024-26884

Kernel

Fixed versions: 4.19.311, 5.4.273, 5.10.214, 5.15.153, 6.1.83, 6.6.23, 6.7.11, 6.8.2

Complete source record
{
  "id": "0aac4488492b4d8f0504f0efaee345edd2d1e904891cb7385dc565eb7cf72cd5",
  "url": "https://osv.dev/vulnerability/CVE-2024-26884",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "bpf: Fix hashtab overflow check on 32-bit arches",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: bpf: Fix hashtab overflow check on 32-bit arches The hashtab code relies on roundup_pow_of_two() to compute the number of hash buckets, and contains an overflow check by checking if the resulting value is 0. However, on 32-bit arches, the roundup code itself can overflow by doing a 32-bit left-shift of an unsigned long value, which is undefined behaviour, so it is not guaranteed to truncate neatly. This was triggered by syzbot on the DEVMAP_HASH type, which contains the same check, copied from the hashtab code. So apply the same fix to hashtab, by moving the overflow check to before the roundup.",
    "evidence": "osv:CVE-2024-26884",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.311",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.273",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.214",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.153",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.83",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.23",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.7.11",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.8.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2024-26884",
      "aliases": [
        "CVE-2024-26884"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "daaf427c6ab392bedcd018e326b2ffa1e1110cd6"
                },
                {
                  "fixed": "33ec04cadb77605b71d9298311919303d390c4d5"
                },
                {
                  "fixed": "92c81fbb3ed2e0dfc33a4183a67135e1ab566ace"
                },
                {
                  "fixed": "64f00b4df0597590b199b62a37a165473bf658a6"
                },
                {
                  "fixed": "3b08cfc65f07b1132c1979d73f014ae6e04de55d"
                },
                {
                  "fixed": "a83fdaeaea3677b83a53f72ace2d73a19bcd6d93"
                },
                {
                  "fixed": "8435f0961bf3dc65e204094349bd9aeaac1f8868"
                },
                {
                  "fixed": "d817f0d34d927f2deb17dadbfe212c9a6a32ac3e"
                },
                {
                  "fixed": "a6fa75b5096c0f9826a4fabe22d907b0a5bb1016"
                },
                {
                  "fixed": "6787d916c2cf9850c97a0a3f73e08c43e7d973b1"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26884.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.19.0"
                },
                {
                  "fixed": "4.19.311"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.273"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.214"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.153"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.83"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.23"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.7.11"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.8.0"
                },
                {
                  "fixed": "6.8.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26884.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:35.126402139Z",
      "provider": "osv",
      "references": [
        "https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
        "https://git.kernel.org/stable/c/33ec04cadb77605b71d9298311919303d390c4d5",
        "https://git.kernel.org/stable/c/3b08cfc65f07b1132c1979d73f014ae6e04de55d",
        "https://git.kernel.org/stable/c/64f00b4df0597590b199b62a37a165473bf658a6",
        "https://git.kernel.org/stable/c/6787d916c2cf9850c97a0a3f73e08c43e7d973b1",
        "https://git.kernel.org/stable/c/8435f0961bf3dc65e204094349bd9aeaac1f8868",
        "https://git.kernel.org/stable/c/92c81fbb3ed2e0dfc33a4183a67135e1ab566ace",
        "https://git.kernel.org/stable/c/a6fa75b5096c0f9826a4fabe22d907b0a5bb1016",
        "https://git.kernel.org/stable/c/a83fdaeaea3677b83a53f72ace2d73a19bcd6d93",
        "https://git.kernel.org/stable/c/d817f0d34d927f2deb17dadbfe212c9a6a32ac3e",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00020.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26884.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-26884",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26884.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-26884",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 502199,
  "published_at": "2024-04-17T10:27:39.672+00:00"
}