CVE-2022-50536 json
bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data
published 2025-10-07 13 mo ago modified 2026-08-05 3 mo ago also EUVD-2025-32021
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 6%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data
In tcp_bpf_send_verdict() redirection, the eval variable is assigned to __SK_REDIRECT after the apply_bytes data is sent, if msg has more_data, sock_put() will be called multiple times.
We should reset the eval variable to __SK_NONE every time more_data starts.
This causes:
IPv4: Attempt to release TCP socket in state 1 00000000b4c925d7 ------------[ cut here ]------------ refcount_t: addition on 0; use-after-free. WARNING: CPU: 5 PID: 4482 at lib/refcount.c:25 refcount_warn_saturate+0x7d/0x110 Modules linked in: CPU: 5 PID: 4482 Comm: sockhash_bypass Kdump: loaded Not tainted 6.0.0 #1 Hardware name: Red Hat KVM, BIOS 1.11.0-2.el7 04/01/2014 Call Trace: <TASK> __tcp_transmit_skb+0xa1b/0xb90 ? __alloc_skb+0x8c/0x1a0 ? __kmalloc_node_track_caller+0x184/0x320 tcp_write_xmit+0x22a/0x1110 __tcp_push_pending_frames+0x32/0xf0 do_tcp_sendpages+0x62d/0x640 tcp_bpf_push+0xae/0x2c0 tcp_bpf_sendmsg_redir+0x260/0x410 ? preempt_count_add+0x70/0xa0 tcp_bpf_send_verdict+0x386/0x4b0 tcp_bpf_sendmsg+0x21b/0x3b0 sock_sendmsg+0x58/0x70 __sys_sendto+0xfa/0x170 ? xfd_validate_state+0x1d/0x80 ? switch_fpu_return+0x59/0xe0 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x37/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd
Patch / fix
- Linux Linux 5.4.229, 5.10.163, 5.15, 5.15.86, 6.0.16, 6.1.2, 6.2
- linux Debian 14, Debian 13, Debian 12 6.1.4-1
debian advisories DEBIAN-CVE-2022-50536
- linux Ubuntu 20.04 LTS 5.4.0-144.161
- linux Ubuntu 22.04 LTS 5.15.0-69.76
- linux-aws Ubuntu 20.04 LTS 5.4.0-1097.105
- linux-aws Ubuntu 22.04 LTS 5.15.0-1033.37
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1101.110
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1031.38
- linux-gke Ubuntu 22.04 LTS 5.15.0-1030.35
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1045.50
ubuntu advisories UBUNTU-CVE-2022-50536
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 9 5.14.0-162.6.1.el9_1
- perf RHEL 9 5.14.0-162.6.1.el9_1
- bpftool RHEL 9 5.14.0-162.6.1.el9_1
- kernel-core RHEL 9 5.14.0-162.6.1.el9_1
- kernel-tools RHEL 9 5.14.0-162.6.1.el9_1
- python3-perf RHEL 9 5.14.0-162.6.1.el9_1
- kernel-modules RHEL 9 5.14.0-162.6.1.el9_1
- kernel-zfcpdump RHEL 9 5.14.0-162.6.1.el9_1
red hat advisories RHSA-2022:8267RHSA-2023:6583RHSA-2022:1988
- kernel-syms SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 4.12.14-122.280.1
- kernel-source SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS 4.12.14-122.280.1
- kernel-default SLES LTSS Extended Security 12 SP5, SLES 12 SP5-LTSS, SLE Live Patching 12 SP5 4.12.14-122.280.1
- kgraft-patch-SLE12-SP5_Update_74 SLE Live Patching 12 SP5 1-8.5.1
suse advisories SUSE-SU-2025:4189-1
- git.kernel.org/stable/c/7508b9f4daac4ec7dfe0b6fb2d688b1c1c105e10 commit
- git.kernel.org/stable/c/28e4a763cd4a2b1a78852216ef4bd7df3a05cec6 commit
- git.kernel.org/stable/c/8786bde11a4f31b63b3036731df0b47337a7a245 commit
- git.kernel.org/stable/c/578a7628b838a3ac8ad61deaab5a816ff032ac13 commit
- git.kernel.org/stable/c/113236e8f49f262f318c00ebb14b15f4834e87c1 commit
- git.kernel.org/stable/c/7a9841ca025275b5b0edfb0b618934abb6ceec15 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-50536 updated cvss 5.5
kernel: bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data
-
Red Hat Enterprise Linux 8 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +6 more Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 moreaffected: workaround, no fix available “To mitigate this issue, prevent module bpf from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.”
-
Red Hat CodeReady Linux Builder (v. 9) kernel-debuginfo-common-s390x 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-x86_64 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-aarch64 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-ppc64le 5.14.0-162.6.1.el9_1 Red Hat Enterprise Linux AppStream (v. 9) perf 5.14.0-162.6.1.el9_1, kernel-devel-matched 5.14.0-162.6.1.el9_1, kernel-debug-devel-matched 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-s390x 5.14.0-162.6.1.el9_1, kernel-zfcpdump-devel-matched 5.14.0-162.6.1.el9_1, kernel-debuginfo-common-x86_64 5.14.0-162.6.1.el9_1, +2 morefixed: vendor fix “To mitigate this issue, prevent module bpf from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.” RHSA-2022:8267
-
Red Hat Enterprise Linux BaseOS (v. 8) perf 4.18.0-372.9.1.el8, kernel 4.18.0-372.9.1.el8, bpftool 4.18.0-372.9.1.el8, kernel-core 4.18.0-372.9.1.el8, kernel-tools 4.18.0-372.9.1.el8, python3-perf 4.18.0-372.9.1.el8, +15 morefixed: vendor fix “To mitigate this issue, prevent module bpf from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.” RHSA-2022:1988
-
Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-162.6.1.el9_1, bpftool 5.14.0-162.6.1.el9_1, kernel-core 5.14.0-162.6.1.el9_1, kernel-tools 5.14.0-162.6.1.el9_1, python3-perf 5.14.0-162.6.1.el9_1, kernel-modules 5.14.0-162.6.1.el9_1, +14 morefixed: vendor fix “To mitigate this issue, prevent module bpf from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.” RHSA-2022:8267
-
Red Hat Enterprise Linux CRB (v. 8) kernel-debuginfo-common-x86_64 4.18.0-372.9.1.el8, kernel-debuginfo-common-aarch64 4.18.0-372.9.1.el8, kernel-debuginfo-common-ppc64le 4.18.0-372.9.1.el8fixed: vendor fix “To mitigate this issue, prevent module bpf from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.” RHSA-2022:1988
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.17% chance of exploitation in the next 30 days, higher than 6% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-415 Double Free
- Technology feeds
References
-
git.kernel.org
/stable/c/7508b9f4daac4ec7dfe0b6fb2d688b1c1c105e10
patch
-
git.kernel.org
/stable/c/28e4a763cd4a2b1a78852216ef4bd7df3a05cec6
patch
-
git.kernel.org
/stable/c/8786bde11a4f31b63b3036731df0b47337a7a245
patch
-
git.kernel.org
/stable/c/578a7628b838a3ac8ad61deaab5a816ff032ac13
patch
-
git.kernel.org
/stable/c/113236e8f49f262f318c00ebb14b15f4834e87c1
patch
-
git.kernel.org
/stable/c/7a9841ca025275b5b0edfb0b618934abb6ceec15
patch
Sources
- CVE List CVE-2022-50536
- NVD CVE-2022-50536
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.