{"id":"CVE-2022-50185","aliases":["CVE-2022-50185"],"related":[],"kind":"vulnerability","state":"published","title":"drm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()\n\nThe last case label can write two buffers 'mc_reg_address[j]' and\n'mc_data[j]' with 'j' offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE\nsince there are no checks for this value in both case labels after the\nlast 'j++'.\n\nInstead of changing '>' to '>=' there, add the bounds check at the start\nof the second 'case' (the first one already has it).\n\nAlso, remove redundant last checks for 'j' index bigger than array size.\nThe expression is always false. Moreover, before or after the patch\n'table->last' can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it\nseems it can be a valid value.\n\nDetected using the static analysis tool - Svace.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/radeon: fix potential buffer overflow in ni_set_mc_special_registers()\n\nThe last case label can write two buffers 'mc_reg_address[j]' and\n'mc_data[j]' with 'j' offset equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE\nsince there are no checks for this value in both case labels after the\nlast 'j++'.\n\nInstead of changing '>' to '>=' there, add the bounds check at the start\nof the second 'case' (the first one already has it).\n\nAlso, remove redundant last checks for 'j' index bigger than array size.\nThe expression is always false. Moreover, before or after the patch\n'table->last' can be equal to SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE and it\nseems it can be a valid value.\n\nDetected using the static analysis tool - Svace.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drm/radeon: corrige un desbordamiento de búfer potencial en ni_set_mc_special_registers() La última etiqueta de caso puede escribir dos búferes 'mc_reg_address[j]' y 'mc_data[j]' con el desplazamiento 'j' igual a SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE ya que no hay comprobaciones para este valor en ambas etiquetas de caso después del último 'j++'. En lugar de cambiar \"&gt;\" a \"&gt;=\" allí, agregue la comprobación de los límites al comienzo del segundo 'caso' (el primero ya lo tiene). Además, elimine las últimas comprobaciones redundantes para el índice 'j' mayor que el tamaño del arreglo. La expresión siempre es falsa. Además, antes o después del parche 'table-&gt;last' puede ser igual a SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE y parece que puede ser un valor válido. Detectado usando la herramienta de análisis estático - Svace.","source":"nvd"}],"published":"2025-06-18T11:03:32.843Z","modified":"2026-06-17T05:22:55.913Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"ea73869df6ef386fc0feeb28ff66742ca835b18f","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"1f341053852be76f82610ce47a505d930512f05c","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"db1a9add3f90ff1c641974d5bb910c16b87af4ef","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"8508d6d23a247c29792ce2fc0df3f3404d6a6a80","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"deb603c5928e546609c0d5798e231d0205748943","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"782e413e38dffd37cc85b08b1ccb982adb4a93ce","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"9faff03617afeced1c4e5daa89e79b3906374342","status":"affected"},{"type":"git","introduced":"69e0b57a91adca2e3eb56ed4db39ab90f3ae1043","fixed":"136f614931a2bb73616b292cf542da3a18daefd5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.11","status":"unaffected"},{"type":"semver","introduced":"4.14.291","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.256","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.211","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.137","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.61","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.18.18","lastAffected":"5.18.*","status":"unaffected"},{"type":"semver","introduced":"5.19.2","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.11","fixed":"4.14.291"},{"status":"affected","introduced":"4.15","fixed":"4.19.256"},{"status":"affected","introduced":"4.20","fixed":"5.4.211"},{"status":"affected","introduced":"5.5","fixed":"5.10.137"},{"status":"affected","introduced":"5.11","fixed":"5.15.61"},{"status":"affected","introduced":"5.16","fixed":"5.18.18"},{"status":"affected","introduced":"5.19","fixed":"5.19.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ea73869df6ef386fc0feeb28ff66742ca835b18f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1f341053852be76f82610ce47a505d930512f05c","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/db1a9add3f90ff1c641974d5bb910c16b87af4ef","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8508d6d23a247c29792ce2fc0df3f3404d6a6a80","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/deb603c5928e546609c0d5798e231d0205748943","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/782e413e38dffd37cc85b08b1ccb982adb4a93ce","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9faff03617afeced1c4e5daa89e79b3906374342","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/136f614931a2bb73616b292cf542da3a18daefd5","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50185","url":"https://www.cve.org/CVERecord?id=CVE-2022-50185","licence":"CVE Terms of Use","modified":"2026-05-11T19:14:26.281Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50185","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50185","licence":"Public domain","modified":"2026-06-17T05:22:55.913Z"}],"updatedAt":"2026-11-25T22:58:21.094Z","epss":{"score":0.00301,"percentile":0.24576,"date":"2026-12-02T12:00:21.000Z"}}