# CVE-2022-50500: netdevsim: fix memory leak in nsim\_drv\_probe() when nsim\_dev\_resources\_register() failed

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-401
- **Published:** 2025-10-04T15:43:50.792Z
- **Modified:** 2026-11-05T21:17:02.580Z

## Who should check

- Anyone running Linux \>= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, \< 7c4957fe40e2a628b7cceaf4c9bfb5b701774d05; \>= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, \< 6b1da9f7126f05e857da6db24c6a04aa7974d644
- Anyone running Linux 4.17

## Description

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

netdevsim: fix memory leak in nsim\_drv\_probe() when nsim\_dev\_resources\_register() failed

If some items in nsim\_dev\_resources\_register() fail, memory leak will
occur. The following is the memory leak information.

unreferenced object 0xffff888074c02600 (size 128):
  comm "echo", pid 8159, jiffies 4294945184 (age 493.530s)
  hex dump (first 32 bytes):
    40 47 ea 89 ff ff ff ff 01 00 00 00 00 00 00 00  @G..............
    ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
  backtrace:
    \[\<0000000011a31c98\>\] kmalloc\_trace+0x22/0x60
    \[\<0000000027384c69\>\] devl\_resource\_register+0x144/0x4e0
    \[\<00000000a16db248\>\] nsim\_drv\_probe+0x37a/0x1260
    \[\<000000007d1f448c\>\] really\_probe+0x20b/0xb10
    \[\<00000000c416848a\>\] \_\_driver\_probe\_device+0x1b3/0x4a0
    \[\<00000000077e0351\>\] driver\_probe\_device+0x49/0x140
    \[\<0000000054f2465a\>\] \_\_device\_attach\_driver+0x18c/0x2a0
    \[\<000000008538f359\>\] bus\_for\_each\_drv+0x151/0x1d0
    \[\<0000000038e09747\>\] \_\_device\_attach+0x1c9/0x4e0
    \[\<00000000dd86e533\>\] bus\_probe\_device+0x1d5/0x280
    \[\<00000000839bea35\>\] device\_add+0xae0/0x1cb0
    \[\<000000009c2abf46\>\] new\_device\_store+0x3b6/0x5f0
    \[\<00000000fb823d7f\>\] bus\_attr\_store+0x72/0xa0
    \[\<000000007acc4295\>\] sysfs\_kf\_write+0x106/0x160
    \[\<000000005f50cb4d\>\] kernfs\_fop\_write\_iter+0x3a8/0x5a0
    \[\<0000000075eb41bf\>\] vfs\_write+0x8f0/0xc80

## Affected and fixed versions

- Linux: \>= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, \< 7c4957fe40e2a628b7cceaf4c9bfb5b701774d05; \>= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, \< 6b1da9f7126f05e857da6db24c6a04aa7974d644 (cvelist)
- Linux: 4.17 (cvelist)

## Mitigation

- Upgrade Linux to 6b1da9f7126f05e857da6db24c6a04aa7974d644 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-50500. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50500.md
Affected: Linux >= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, < 7c4957fe40e2a628b7cceaf4c9bfb5b701774d05; >= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, < 6b1da9f7126f05e857da6db24c6a04aa7974d644; Linux 4.17
Fixed in: Linux 7c4957fe40e2a628b7cceaf4c9bfb5b701774d05, Linux 6b1da9f7126f05e857da6db24c6a04aa7974d644

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-50500 being exploited?

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

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

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

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

Linux \>= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, \< 7c4957fe40e2a628b7cceaf4c9bfb5b701774d05; \>= 37923ed6b8cea94d7d76038e2f72c57a0b45daab, \< 6b1da9f7126f05e857da6db24c6a04aa7974d644; Linux 4.17.

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

Yes. Fixed in Linux 7c4957fe40e2a628b7cceaf4c9bfb5b701774d05, Linux 6b1da9f7126f05e857da6db24c6a04aa7974d644. Upgrade Linux to 6b1da9f7126f05e857da6db24c6a04aa7974d644 or later.

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

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/7c4957fe40e2a628b7cceaf4c9bfb5b701774d05>
- patch: <https://git.kernel.org/stable/c/6b1da9f7126f05e857da6db24c6a04aa7974d644>

## 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-50500>

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