{"id":"CVE-2026-98176","summary":"drm/amdkfd: Avoid integer underflow with ffs in EOP ring size calc","details":"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-\u003eeop_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-\u003eeop_ring_buffer_size / sizeof(unsigned int) / 4)\n\nusing properties of logarithms.\n\n(cherry picked from commit 4f18c56630383c14bfc6b2d65f88f2f895d2121a)","modified":"2026-10-20T02:33:19.176236050Z","published":"2026-10-06T08:44:20.004Z","related":["openSUSE-SU-2026:12131-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98176.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/82e1b8299c6da02ce02185c208d2fdf7572b5ea1"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c883d0a132d430ef7ebb23fd94323be94d0fbdb8"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98176.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-98176"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"14328aa58ce523a59996c5a82681c43ec048cc33"},{"fixed":"82e1b8299c6da02ce02185c208d2fdf7572b5ea1"},{"fixed":"c883d0a132d430ef7ebb23fd94323be94d0fbdb8"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-98176.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.3.0"},{"fixed":"7.2.8"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-98176.json"}}],"schema_version":"1.9.0"}