# CVE-2022-50295: io\_uring/msg\_ring: Fix NULL pointer dereference in io\_msg\_send\_fd()

> 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-476
- **Published:** 2025-09-15T14:45:51.241Z
- **Modified:** 2026-11-05T20:17:32.893Z

## Who should check

- Anyone running Linux \>= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, \< 0163e04ea64cc3dfaa12390286e5f2f481c3b2e3; \>= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, \< 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2
- Anyone running Linux 6.0

## Description

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

io\_uring/msg\_ring: Fix NULL pointer dereference in io\_msg\_send\_fd()

Syzkaller produced the below call trace:

 BUG: KASAN: null-ptr-deref in io\_msg\_ring+0x3cb/0x9f0
 Write of size 8 at addr 0000000000000070 by task repro/16399

 CPU: 0 PID: 16399 Comm: repro Not tainted 6.1.0-rc1 \#28
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7
 Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0xcd/0x134
  ? io\_msg\_ring+0x3cb/0x9f0
  kasan\_report+0xbc/0xf0
  ? io\_msg\_ring+0x3cb/0x9f0
  kasan\_check\_range+0x140/0x190
  io\_msg\_ring+0x3cb/0x9f0
  ? io\_msg\_ring\_prep+0x300/0x300
  io\_issue\_sqe+0x698/0xca0
  io\_submit\_sqes+0x92f/0x1c30
  \_\_do\_sys\_io\_uring\_enter+0xae4/0x24b0
....
 RIP: 0033:0x7f2eaf8f8289
 RSP: 002b:00007fff40939718 EFLAGS: 00000246 ORIG\_RAX: 00000000000001aa
 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2eaf8f8289
 RDX: 0000000000000000 RSI: 0000000000006f71 RDI: 0000000000000004
 RBP: 00007fff409397a0 R08: 0000000000000000 R09: 0000000000000039
 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004006d0
 R13: 00007fff40939880 R14: 0000000000000000 R15: 0000000000000000
  \</TASK\>
 Kernel panic - not syncing: panic\_on\_warn set ...

We don't have a NULL check on file\_ptr in io\_msg\_send\_fd() function,
so when file\_ptr is NUL src\_file is also NULL and get\_file()
dereferences a NULL pointer and leads to above crash.

Add a NULL check to fix this issue.

## Affected and fixed versions

- Linux: \>= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, \< 0163e04ea64cc3dfaa12390286e5f2f481c3b2e3; \>= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, \< 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2022-50295.md
Affected: Linux >= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, < 0163e04ea64cc3dfaa12390286e5f2f481c3b2e3; >= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, < 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2; Linux 6.0
Fixed in: Linux 0163e04ea64cc3dfaa12390286e5f2f481c3b2e3, Linux 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2

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

There is no confirmed exploitation: CVE-2022-50295 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-50295?

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

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

Linux \>= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, \< 0163e04ea64cc3dfaa12390286e5f2f481c3b2e3; \>= e6130eba8a848a7a6ba6c534bd8f6d60749ae1a9, \< 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2; Linux 6.0.

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

Yes. Fixed in Linux 0163e04ea64cc3dfaa12390286e5f2f481c3b2e3, Linux 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2. Upgrade Linux to 16bbdfe5fb0e78e0acb13e45fc127e9a296913f2 or later.

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

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/0163e04ea64cc3dfaa12390286e5f2f481c3b2e3>
- patch: <https://git.kernel.org/stable/c/16bbdfe5fb0e78e0acb13e45fc127e9a296913f2>

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

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