# CVE-2022-49939: binder: fix UAF of ref-\>proc caused by race condition

> 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, CNA) `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.21% (percentile 7, 2026-11-30)
- **CWE:** CWE-362, CWE-416
- **Published:** 2025-06-18T10:54:40.100Z
- **Modified:** 2026-08-05T08:56:48.206Z

## Who should check

- Anyone running Linux \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 229f47603dd306bc0eb1a831439adb8e48bb0eae; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 06e5b43ca4dab06a92bf4c2f33766e6fb11b880a; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 30d0901b307f27d36b2655fb3048cf31ee0e89c0; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 9629f2dfdb1dad294b468038ff8e161e94d0b609; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< c2a4b5dc8fa71af73bab704d0cac42ac39767ed6; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 603a47f2ae56bf68288784d3c0a8c5b8e0a827ed; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< a0e44c64b6061dda7e00b7c458e4523e2331b739
- Anyone running Linux 4.14

## Description

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

binder: fix UAF of ref-\>proc caused by race condition

A transaction of type BINDER\_TYPE\_WEAK\_HANDLE can fail to increment the
reference for a node. In this case, the target proc normally releases
the failed reference upon close as expected. However, if the target is
dying in parallel the call will race with binder\_deferred\_release(), so
the target could have released all of its references by now leaving the
cleanup of the new failed reference unhandled.

The transaction then ends and the target proc gets released making the
ref-\>proc now a dangling pointer. Later on, ref-\>node is closed and we
attempt to take spin\_lock(&ref-\>proc-\>inner\_lock), which leads to the
use-after-free bug reported below. Let's fix this by cleaning up the
failed reference on the spot instead of relying on the target to do so.

  ==================================================================
  BUG: KASAN: use-after-free in \_raw\_spin\_lock+0xa8/0x150
  Write of size 4 at addr ffff5ca207094238 by task kworker/1:0/590

  CPU: 1 PID: 590 Comm: kworker/1:0 Not tainted 5.19.0-rc8 \#10
  Hardware name: linux,dummy-virt (DT)
  Workqueue: events binder\_deferred\_func
  Call trace:
   dump\_backtrace.part.0+0x1d0/0x1e0
   show\_stack+0x18/0x70
   dump\_stack\_lvl+0x68/0x84
   print\_report+0x2e4/0x61c
   kasan\_report+0xa4/0x110
   kasan\_check\_range+0xfc/0x1a4
   \_\_kasan\_check\_write+0x3c/0x50
   \_raw\_spin\_lock+0xa8/0x150
   binder\_deferred\_func+0x5e0/0x9b0
   process\_one\_work+0x38c/0x5f0
   worker\_thread+0x9c/0x694
   kthread+0x188/0x190
   ret\_from\_fork+0x10/0x20

## Affected and fixed versions

- Linux: \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 229f47603dd306bc0eb1a831439adb8e48bb0eae; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 06e5b43ca4dab06a92bf4c2f33766e6fb11b880a; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 30d0901b307f27d36b2655fb3048cf31ee0e89c0; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 9629f2dfdb1dad294b468038ff8e161e94d0b609; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< c2a4b5dc8fa71af73bab704d0cac42ac39767ed6; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 603a47f2ae56bf68288784d3c0a8c5b8e0a827ed; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< a0e44c64b6061dda7e00b7c458e4523e2331b739 (cvelist)
- Linux: 4.14 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49939.md
Affected: Linux >= 372e3147df7016ebeaa372939e8774a1292db558, < 229f47603dd306bc0eb1a831439adb8e48bb0eae; >= 372e3147df7016ebeaa372939e8774a1292db558, < 06e5b43ca4dab06a92bf4c2f33766e6fb11b880a; >= 372e3147df7016ebeaa372939e8774a1292db558, < 30d0901b307f27d36b2655fb3048cf31ee0e89c0; >= 372e3147df7016ebeaa3729…
Fixed in: Linux 229f47603dd306bc0eb1a831439adb8e48bb0eae, Linux 06e5b43ca4dab06a92bf4c2f33766e6fb11b880a, Linux 30d0901b307f27d36b2655fb3048cf31ee0e89c0, Linux 9629f2dfdb1dad294b468038ff8e161e94d0b609, Linux 603a47f2ae56bf68288784d3c0a8c5b8e0a827ed

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

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

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

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

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

Linux \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 229f47603dd306bc0eb1a831439adb8e48bb0eae; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 06e5b43ca4dab06a92bf4c2f33766e6fb11b880a; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 30d0901b307f27d36b2655fb3048cf31ee0e89c0; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 9629f2dfdb1dad294b468038ff8e161e94d0b609; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< c2a4b5dc8fa71af73bab704d0cac42ac39767ed6; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< 603a47f2ae56bf68288784d3c0a8c5b8e0a827ed; \>= 372e3147df7016ebeaa372939e8774a1292db558, \< a0e44c64b6061dda7e00b7c458e4523e2331b739; Linux 4.14.

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

Yes. Fixed in Linux 229f47603dd306bc0eb1a831439adb8e48bb0eae, Linux 06e5b43ca4dab06a92bf4c2f33766e6fb11b880a, Linux 30d0901b307f27d36b2655fb3048cf31ee0e89c0, Linux 9629f2dfdb1dad294b468038ff8e161e94d0b609, Linux 603a47f2ae56bf68288784d3c0a8c5b8e0a827ed. No fix listed yet: follow the vendor advisory.

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

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/229f47603dd306bc0eb1a831439adb8e48bb0eae>
- patch: <https://git.kernel.org/stable/c/06e5b43ca4dab06a92bf4c2f33766e6fb11b880a>
- patch: <https://git.kernel.org/stable/c/30d0901b307f27d36b2655fb3048cf31ee0e89c0>
- patch: <https://git.kernel.org/stable/c/9629f2dfdb1dad294b468038ff8e161e94d0b609>
- patch: <https://git.kernel.org/stable/c/c2a4b5dc8fa71af73bab704d0cac42ac39767ed6>
- patch: <https://git.kernel.org/stable/c/603a47f2ae56bf68288784d3c0a8c5b8e0a827ed>
- patch: <https://git.kernel.org/stable/c/a0e44c64b6061dda7e00b7c458e4523e2331b739>

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

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