# CVE-2022-50620: f2fs: fix to invalidate dcc-\>f2fs\_issue\_discard in error path

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-12-08T01:16:33.771Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< 865bb7b5a7deeb0e5afbd82381d52d38825dc64d; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< a3e517a6ba695d683ee63615e1ea6e6b4c7d2732; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< ae6c960a82c52c3bda5adc82d90643d6c12d308e; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< 91586ce0d39a05f88795aa8814fb99b1387236b3
- Anyone running Linux 5.15

## Description

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

f2fs: fix to invalidate dcc-\>f2fs\_issue\_discard in error path

Syzbot reports a NULL pointer dereference issue as below:

 \_\_refcount\_add include/linux/refcount.h:193 \[inline\]
 \_\_refcount\_inc include/linux/refcount.h:250 \[inline\]
 refcount\_inc include/linux/refcount.h:267 \[inline\]
 get\_task\_struct include/linux/sched/task.h:110 \[inline\]
 kthread\_stop+0x34/0x1c0 kernel/kthread.c:703
 f2fs\_stop\_discard\_thread+0x3c/0x5c fs/f2fs/segment.c:1638
 kill\_f2fs\_super+0x5c/0x194 fs/f2fs/super.c:4522
 deactivate\_locked\_super+0x70/0xe8 fs/super.c:332
 deactivate\_super+0xd0/0xd4 fs/super.c:363
 cleanup\_mnt+0x1f8/0x234 fs/namespace.c:1186
 \_\_cleanup\_mnt+0x20/0x30 fs/namespace.c:1193
 task\_work\_run+0xc4/0x14c kernel/task\_work.c:177
 exit\_task\_work include/linux/task\_work.h:38 \[inline\]
 do\_exit+0x26c/0xbe0 kernel/exit.c:795
 do\_group\_exit+0x60/0xe8 kernel/exit.c:925
 \_\_do\_sys\_exit\_group kernel/exit.c:936 \[inline\]
 \_\_se\_sys\_exit\_group kernel/exit.c:934 \[inline\]
 \_\_wake\_up\_parent+0x0/0x40 kernel/exit.c:934
 \_\_invoke\_syscall arch/arm64/kernel/syscall.c:38 \[inline\]
 invoke\_syscall arch/arm64/kernel/syscall.c:52 \[inline\]
 el0\_svc\_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do\_el0\_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0\_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:636
 el0t\_64\_sync\_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:654
 el0t\_64\_sync+0x18c/0x190 arch/arm64/kernel/entry.S:581

The root cause of this issue is in error path of f2fs\_start\_discard\_thread(),
it missed to invalidate dcc-\>f2fs\_issue\_discard, later kthread\_stop() may
access invalid pointer.

## Affected and fixed versions

- Linux: \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< 865bb7b5a7deeb0e5afbd82381d52d38825dc64d; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< a3e517a6ba695d683ee63615e1ea6e6b4c7d2732; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< ae6c960a82c52c3bda5adc82d90643d6c12d308e; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< 91586ce0d39a05f88795aa8814fb99b1387236b3 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2022-50620.md
Affected: Linux >= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, < 865bb7b5a7deeb0e5afbd82381d52d38825dc64d; >= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, < a3e517a6ba695d683ee63615e1ea6e6b4c7d2732; >= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, < ae6c960a82c52c3bda5adc82d90643d6c12d308e; >= 4d67490498acb4ffcef5ba7…
Fixed in: Linux 865bb7b5a7deeb0e5afbd82381d52d38825dc64d, Linux 91586ce0d39a05f88795aa8814fb99b1387236b3

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

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

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

It has no CVSS score yet. Unknown.

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

Linux \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< 865bb7b5a7deeb0e5afbd82381d52d38825dc64d; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< a3e517a6ba695d683ee63615e1ea6e6b4c7d2732; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< ae6c960a82c52c3bda5adc82d90643d6c12d308e; \>= 4d67490498acb4ffcef5ba7bc44990d46e66a44c, \< 91586ce0d39a05f88795aa8814fb99b1387236b3; Linux 5.15.

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

Yes. Fixed in Linux 865bb7b5a7deeb0e5afbd82381d52d38825dc64d, Linux 91586ce0d39a05f88795aa8814fb99b1387236b3. Upgrade Linux to 91586ce0d39a05f88795aa8814fb99b1387236b3 or later.

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

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

- other: <https://git.kernel.org/stable/c/865bb7b5a7deeb0e5afbd82381d52d38825dc64d>
- other: <https://git.kernel.org/stable/c/a3e517a6ba695d683ee63615e1ea6e6b4c7d2732>
- other: <https://git.kernel.org/stable/c/ae6c960a82c52c3bda5adc82d90643d6c12d308e>
- other: <https://git.kernel.org/stable/c/91586ce0d39a05f88795aa8814fb99b1387236b3>

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

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