# CVE-2022-50185: drm/radeon: fix potential buffer overflow in ni\_set\_mc\_special\_registers()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2025-06-18T11:03:32.843Z
- **Modified:** 2026-06-17T05:22:55.913Z

## Who should check

- Anyone running Linux \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< ea73869df6ef386fc0feeb28ff66742ca835b18f; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 1f341053852be76f82610ce47a505d930512f05c; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< db1a9add3f90ff1c641974d5bb910c16b87af4ef; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 8508d6d23a247c29792ce2fc0df3f3404d6a6a80; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< deb603c5928e546609c0d5798e231d0205748943; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 782e413e38dffd37cc85b08b1ccb982adb4a93ce; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 9faff03617afeced1c4e5daa89e79b3906374342; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 136f614931a2bb73616b292cf542da3a18daefd5
- Anyone running Linux 3.11

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/radeon: fix potential buffer overflow in ni\_set\_mc\_special\_registers()

The last case label can write two buffers 'mc\_reg\_address\[j\]' and
'mc\_data\[j\]' with 'j' offset equal to SMC\_NISLANDS\_MC\_REGISTER\_ARRAY\_SIZE
since there are no checks for this value in both case labels after the
last 'j++'.

Instead of changing '\>' to '\>=' there, add the bounds check at the start
of the second 'case' (the first one already has it).

Also, remove redundant last checks for 'j' index bigger than array size.
The expression is always false. Moreover, before or after the patch
'table-\>last' can be equal to SMC\_NISLANDS\_MC\_REGISTER\_ARRAY\_SIZE and it
seems it can be a valid value.

Detected using the static analysis tool - Svace.

## Affected and fixed versions

- Linux: \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< ea73869df6ef386fc0feeb28ff66742ca835b18f; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 1f341053852be76f82610ce47a505d930512f05c; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< db1a9add3f90ff1c641974d5bb910c16b87af4ef; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 8508d6d23a247c29792ce2fc0df3f3404d6a6a80; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< deb603c5928e546609c0d5798e231d0205748943; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 782e413e38dffd37cc85b08b1ccb982adb4a93ce; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 9faff03617afeced1c4e5daa89e79b3906374342; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 136f614931a2bb73616b292cf542da3a18daefd5 (cvelist)
- Linux: 3.11 (cvelist)

## Mitigation

- Upgrade Linux to 136f614931a2bb73616b292cf542da3a18daefd5 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50185. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50185.md
Affected: Linux >= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, < ea73869df6ef386fc0feeb28ff66742ca835b18f; >= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, < 1f341053852be76f82610ce47a505d930512f05c; >= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, < db1a9add3f90ff1c641974d5bb910c16b87af4ef; >= 69e0b57a91adca2e3eb56ed…
Fixed in: Linux 1f341053852be76f82610ce47a505d930512f05c, Linux 8508d6d23a247c29792ce2fc0df3f3404d6a6a80, Linux 782e413e38dffd37cc85b08b1ccb982adb4a93ce, Linux 9faff03617afeced1c4e5daa89e79b3906374342, Linux 136f614931a2bb73616b292cf542da3a18daefd5

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50185 being exploited?

There is no confirmed exploitation: CVE-2022-50185 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50185?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50185?

Linux \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< ea73869df6ef386fc0feeb28ff66742ca835b18f; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 1f341053852be76f82610ce47a505d930512f05c; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< db1a9add3f90ff1c641974d5bb910c16b87af4ef; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 8508d6d23a247c29792ce2fc0df3f3404d6a6a80; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< deb603c5928e546609c0d5798e231d0205748943; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 782e413e38dffd37cc85b08b1ccb982adb4a93ce; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 9faff03617afeced1c4e5daa89e79b3906374342; \>= 69e0b57a91adca2e3eb56ed4db39ab90f3ae1043, \< 136f614931a2bb73616b292cf542da3a18daefd5; Linux 3.11.

### Is there a fix for CVE-2022-50185?

Yes. Fixed in Linux 1f341053852be76f82610ce47a505d930512f05c, Linux 8508d6d23a247c29792ce2fc0df3f3404d6a6a80, Linux 782e413e38dffd37cc85b08b1ccb982adb4a93ce, Linux 9faff03617afeced1c4e5daa89e79b3906374342, Linux 136f614931a2bb73616b292cf542da3a18daefd5. Upgrade Linux to 136f614931a2bb73616b292cf542da3a18daefd5 or later.

### How do I check if I'm affected by CVE-2022-50185?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/ea73869df6ef386fc0feeb28ff66742ca835b18f>
- patch: <https://git.kernel.org/stable/c/1f341053852be76f82610ce47a505d930512f05c>
- patch: <https://git.kernel.org/stable/c/db1a9add3f90ff1c641974d5bb910c16b87af4ef>
- patch: <https://git.kernel.org/stable/c/8508d6d23a247c29792ce2fc0df3f3404d6a6a80>
- patch: <https://git.kernel.org/stable/c/deb603c5928e546609c0d5798e231d0205748943>
- patch: <https://git.kernel.org/stable/c/782e413e38dffd37cc85b08b1ccb982adb4a93ce>
- patch: <https://git.kernel.org/stable/c/9faff03617afeced1c4e5daa89e79b3906374342>
- patch: <https://git.kernel.org/stable/c/136f614931a2bb73616b292cf542da3a18daefd5>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50185>

HTML: <https://flawdb.com/CVE-2022-50185> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50185>
