cve.bz

CVE-2022-49939 linux linux kernel: Race Condition

7.0 highEPSS 0.2%Fix available

High (7.0) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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

Severity

CVSS 3.1

7.0 high
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 8th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
CWE-416 Use After Free
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-49939 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-49939?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-49939?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-49939 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux4.14 and later

Fixed in

ProductRelease lineFixed in
Linux4.144.14.293
Linux4.194.19.258
Linux5.45.4.213
Linux5.105.10.142
Linux5.155.15.66
Linux5.195.19.8
Linuxlater releases6.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14linux5.19.11-1DEBIAN-CVE-2022-49939
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux4.15.0-201.212UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-aws4.15.0-1147.159UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-aws-5.45.4.0-1093.102~18.04.2UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-azure-4.154.15.0-1158.173UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-azure-5.45.4.0-1100.106~18.04.1UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-gcp-4.154.15.0-1142.158UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-gcp-5.45.4.0-1097.106~18.04.1UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-hwe-5.45.4.0-136.153~18.04.1UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-ibm-5.45.4.0-1041.46~18.04.1UBUNTU-CVE-2022-49939
Ubuntu18.04:LTSlinux-kvm4.15.0-1133.138UBUNTU-CVE-2022-49939
52 more for Ubuntu in the JSON and on Ubuntu's page.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Low.

Red Hat's statement

This vulnerability does not impact Red Hat Enterprise Linux as the Android Binder IPC subsystem is not enabled in Red Hat kernel configurations. The issue stems from concurrency during driver process teardown that can lead to memory corruption when handling failed references. Because Red Hat does not compile or distribute this Android-specific driver, supported environments are unaffected.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-49939.

Attack patterns (CAPEC)

  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-29 Leveraging Time-of-Check and Time-of-Use (TOCTOU) Race Conditions Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON