{"id":"CVE-2026-98176","aliases":["CVE-2026-98176"],"related":[],"kind":"vulnerability","state":"published","title":"drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc\n\nThe low 6 bits of cp_hqd_eop_control store the base-2 logarithm\nof the EOP ring size. This was calculated as\n\nffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1\n\nBut ffs can in theory return 1 or 0, so this could underflow\n(although in practice the ring buffer size cannot be less than 4096).\n\nChange this to\n\nffs(q->eop_ring_buffer_size / sizeof(unsigned int) / 4)\n\nusing properties of logarithms.\n\n(cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc\n\nThe low 6 bits of cp_hqd_eop_control store the base-2 logarithm\nof the EOP ring size. This was calculated as\n\nffs(q->eop_ring_buffer_size / sizeof(unsigned int)) - 1 - 1\n\nBut ffs can in theory return 1 or 0, so this could underflow\n(although in practice the ring buffer size cannot be less than 4096).\n\nChange this to\n\nffs(q->eop_ring_buffer_size / sizeof(unsigned int) / 4)\n\nusing properties of logarithms.\n\n(cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a)","source":"cvelist"}],"published":"2026-10-06T08:44:20.004Z","modified":"2026-11-23T08:17:23.957Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"14328aa58ce523a59996c5a82681c43ec048cc33","fixed":"4105d54716c6082b2ff495f2506af130ef79ce0a","status":"affected"},{"type":"git","introduced":"14328aa58ce523a59996c5a82681c43ec048cc33","fixed":"6a6d407eb4a8b427240b59d0d2d1f8e1878f06b3","status":"affected"},{"type":"git","introduced":"14328aa58ce523a59996c5a82681c43ec048cc33","fixed":"1ab281c7ce2dc5195d337f2c16e22eba356b47f9","status":"affected"},{"type":"git","introduced":"14328aa58ce523a59996c5a82681c43ec048cc33","fixed":"9e8f43579f849fba0dd1059160f50bd44a767366","status":"affected"},{"type":"git","introduced":"14328aa58ce523a59996c5a82681c43ec048cc33","fixed":"82e1b8299c6da02ce02185c208d2fdf7572b5ea1","status":"affected"},{"type":"git","introduced":"14328aa58ce523a59996c5a82681c43ec048cc33","fixed":"c883d0a132d430ef7ebb23fd94323be94d0fbdb8","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.3","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.3","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.61","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.8","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/4105d54716c6082b2ff495f2506af130ef79ce0a","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6a6d407eb4a8b427240b59d0d2d1f8e1878f06b3","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1ab281c7ce2dc5195d337f2c16e22eba356b47f9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9e8f43579f849fba0dd1059160f50bd44a767366","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/82e1b8299c6da02ce02185c208d2fdf7572b5ea1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c883d0a132d430ef7ebb23fd94323be94d0fbdb8","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-98176","url":"https://www.cve.org/CVERecord?id=CVE-2026-98176","licence":"CVE Terms of Use","modified":"2026-11-23T07:59:33.363Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-98176","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98176","licence":"Public domain","modified":"2026-11-23T08:17:23.957Z"}],"updatedAt":"2026-11-25T22:59:42.278Z","epss":{"score":0.00213,"percentile":0.0659,"date":"2026-11-30T12:00:22.000Z"}}