drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc
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)
CVE-2026-98176
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-98176
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "14328aa58ce523a59996c5a82681c43ec048cc33",
"lessThan": "82e1b8299c6da02ce02185c208d2fdf7572b5ea1",
"versionType": "git"
},
{
"status": "affected",
"version": "14328aa58ce523a59996c5a82681c43ec048cc33",
"lessThan": "c883d0a132d430ef7ebb23fd94323be94d0fbdb8",
"versionType": "git"
}
],
"programFiles": [
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c",
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c",
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c",
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "5.3"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "5.3",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "7.2.8",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c",
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c",
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c",
"drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-98176
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #38259 · Revision 1
- Added to Heist Feed
- Publisher date