Skip to content
Heist/ feed
Back to feed
UnratedFix available

drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc The low 6 bits of cp_hqd_eop_control store the base-2 logarithm of the EOP ring size. This was calculated as ffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1 But ffs can in theory return 1 or 0, so this could underflow (although in practice the ring buffer size cannot be less than 4096). Change this to ffs(q->eop_ring_buffer_size / sizeof(unsigned int) / 4) using properties of logarithms. (cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a)

Products
Kernel
Affected versions
Not specified
Fixed versions
7.2.8
CVEs
CVE-2026-98176
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 20:37 UTC · Revision 1

Source evidence

drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc

core-osv · Original source

Published 6 Oct 2026, 08:44 UTC

In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc The low 6 bits of cp_hqd_eop_control store the base-2 logarithm of the EOP ring size. This was calculated as ffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1 But ffs can in theory return 1 or 0, so this could underflow (although in practice the ring buffer size cannot be less than 4096). Change this to ffs(q->eop_ring_buffer_size / sizeof(unsigned int) / 4) using properties of logarithms. (cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a)

osv:CVE-2026-98176

Kernel

Fixed versions: 7.2.8

Complete source record
{
  "id": "bb59acb3a112828ebec135dbbeea3a67bd8ed8dce63c949c5d95de263d3d5f73",
  "url": "https://osv.dev/vulnerability/CVE-2026-98176",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc The low 6 bits of cp_hqd_eop_control store the base-2 logarithm of the EOP ring size. This was calculated as ffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1 But ffs can in theory return 1 or 0, so this could underflow (although in practice the ring buffer size cannot be less than 4096). Change this to ffs(q->eop_ring_buffer_size / sizeof(unsigned int) / 4) using properties of logarithms. (cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a)",
    "evidence": "osv:CVE-2026-98176",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "7.2.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98176",
      "aliases": [
        "CVE-2026-98176"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "14328aa58ce523a59996c5a82681c43ec048cc33"
                },
                {
                  "fixed": "82e1b8299c6da02ce02185c208d2fdf7572b5ea1"
                },
                {
                  "fixed": "c883d0a132d430ef7ebb23fd94323be94d0fbdb8"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98176.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.3.0"
                },
                {
                  "fixed": "7.2.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98176.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:39.069660327Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/82e1b8299c6da02ce02185c208d2fdf7572b5ea1",
        "https://git.kernel.org/stable/c/c883d0a132d430ef7ebb23fd94323be94d0fbdb8",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98176.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98176",
        "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/2026/98xxx/CVE-2026-98176.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98176",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 506751,
  "published_at": "2026-10-06T08:44:20.004+00:00"
}