cve.bz

CVE-2022-50259 linux linux kernel: Race Condition

4.7 mediumEPSS 0.1%Fix available

Medium (4.7) in linux linux kernel. EPSS 0.1% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: fix race in sock_map_free() sock_map_free() calls release_sock(sk) without owning a reference on the socket. This can cause use-after-free as syzbot found [1] Jakub Sitnicki already took care of a similar issue in sock_hash_free() in commit 75e68e5bf2c7 ("bpf, sockhash: Synchronize delete from bucket list on map free") [1] refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 0 PID: 3785 at lib/refcount.c:31 refcount_warn_saturate+0x17c/0x1a0 lib/refcount.c:31 Modules linked in: CPU: 0 PID: 3785 Comm: kworker/u4:6 Not tainted 6.1.0-rc7-syzkaller-00103-gef4d3ea40565 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Workqueue: events_unbound bpf_map_free_deferred RIP: 0010:refcount_warn_saturate+0x17c/0x1a0 lib/refcount.c:31 Code: 68 8b 31 c0 e8 75 71 15 fd 0f 0b e9 64 ff ff ff e8 d9 6e 4e fd c6 05 62 9c 3d 0a 01 48 c7 c7 80 bb 68 8b 31 c0 e8 54 71 15 fd <0f> 0b e9 43 ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c a2 fe ff RSP: 0018:ffffc9000456fb60 EFLAGS: 00010246 RAX: eae59bab72dcd700 RBX: 0000000000000004 RCX: ffff8880207057c0 RDX: 0000000000000000 RSI: 0000000000000201 RDI: 0000000000000000 RBP: 0000000000000004 R08: ffffffff816fdabd R09: fffff520008adee5 R10: fffff520008adee5 R11: 1ffff920008adee4 R12: 0000000000000004 R13: dffffc0000000000 R14: ffff88807b1c6c00 R15: 1ffff1100f638dcf FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30c30000 CR3: 000000000d08e000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] __sock_put include/net/sock.h:779 [inline] tcp_release_cb+0x2d0/0x360 net/ipv4/tcp_output.c:1092 release_sock+0xaf/0x1c0 net/core/sock.c:3468 sock_map_free+0x219/0x2c0 net/core/sock_map.c:356 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436 kthread+0x266/0x300 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 </TASK>

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.1% (unchanged from 0.1% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 2nd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization (Race Condition)
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-50259 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-50259?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-50259?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-50259 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
Linuxfrom 5.4.14 before 5.4.229
Linux5.5 and later

Fixed in

ProductRelease lineFixed in
Linux5.45.4.229
Linux5.105.10.163
Linux5.155.15.86
Linux6.06.0.16
Linux6.16.1.2
Linuxlater releases6.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14linux6.1.4-1DEBIAN-CVE-2022-50259
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-aws-5.45.4.0-1097.105~18.04.1UBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-azure-5.45.4.0-1104.110~18.04.1UBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-gcp-5.45.4.0-1101.110~18.04.1UBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-hwe-5.45.4.0-144.161~18.04.1UBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-ibm-5.45.4.0-1045.50~18.04.1UBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-oracle-5.45.4.0-1094.103~18.04.1UBUNTU-CVE-2022-50259
Ubuntu18.04:LTSlinux-raspi-5.45.4.0-1081.92~18.04.1UBUNTU-CVE-2022-50259
Ubuntu20.04:LTSlinux5.4.0-144.161UBUNTU-CVE-2022-50259
Ubuntu20.04:LTSlinux-aws5.4.0-1097.105UBUNTU-CVE-2022-50259
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1033.37~20.04.1UBUNTU-CVE-2022-50259
39 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

A use-after-free flaw was found in the Linux kernel's BPF sockmap implementation. The sock_map_free() function calls release_sock(sk) without owning a reference on the socket, so a local user able to create and tear down BPF sockmaps can trigger a race condition that causes a use-after-free and a system crash, resulting in a denial of service. Red Hat rates the impact of this issue as Low because exploitation requires local access with high privileges, the race condition is difficult to win, and the demonstrated impact is limited to system availability. This differs from the upstream CVE record, which assigns a higher severity (7.8, including high confidentiality and integrity impact); the available technical evidence, including the syzbot report, shows only an availability impact from the use-after-free and no indication of confidentiality or integrity impact. Red Hat Enterprise Linux 8 and 9, including the kernel-rt variant, are affected. The fix is currently deferred on the affected streams: given the low severity, the high privileges required, and the narrow timing window of the race, a fix will be delivered in a future planned update rather than as an urgent out-of-band fix. The residual risk is that a highly privileged local attacker able to use BPF sockmaps could crash the system, causing a denial of service. Red Hat Enterprise Linux 6, 7, and 10, and Red Hat In-Vehicle OS are not affected because the vulnerable code is not present in those products.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

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 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

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-50259.

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