CVE-2022-50536
kernel: bpf, sockmap: Fix repeated calls to sock_put() when msg has more_data
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · October 7, 2025
Updated · August 14, 2026
Description
A reference-count flaw was found in the Linux kernel Berkeley Packet Filter (BPF) sockmap implementation. When processing messages with remaining data, the same Transmission Control Protocol (TCP) socket reference could be released more than once. A local user running BPF sockmap programs could use this flaw to trigger a use-after-free and crash the system, resulting in a denial of service.
Statement
The flaw arises because the verdict state was not reset at boundaries where additional message data arrives, causing the same socket reference to be dropped more than once. The fix resets the internal verdict state when handling continued data, preventing double release.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
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.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-1341 · Multiple Releases of Same Resource or Handle