CVE-2022-49877: bpf, sockmap: Fix the sk->sk_forward_alloc warning of sk_stream_kill_queues
In the Linux kernel, the following vulnerability has been resolved:
bpf, sockmap: Fix the sk->sk_forward_alloc warning of sk_stream_kill_queues
When running `test_sockmap` selftests, the following warning appears:
WARNING: CPU: 2 PID: 197 at net/core/stream.c:205 sk_stream_kill_queues+0xd3/0xf0
Call Trace:
<TASK>
inet_csk_destroy_sock+0x55/0x110
tcp_rcv_state_process+0xd28/0x1380
? tcp_v4_do_rcv+0x77/0x2c0
tcp_v4_do_rcv+0x77/0x2c0
__release_sock+0x106/0x130
__tcp_close+0x1a7/0x4e0
tcp_close+0x20/0x70
inet_release+0x3c/0x80
__sock_release+0x3a/0xb0
sock_close+0x14/0x20
__fput+0xa3/0x260
task_work_run+0x59/0xb0
exit_to_user_mode_prepare+0x1b3/0x1c0
syscall_exit_to_user_mode+0x19/0x50
do_syscall_64+0x48/0x90
entry_SYSCALL_64_after_hwframe+0x44/0xae
The root case is in commit 84472b436e76 ("bpf, sockmap: Fix more uncharged
while msg has more_data"), where I used msg->sg.size to replace the tosend,
causing breakage:
if (msg->apply_bytes && msg->apply_bytes < tosend)
tosend = psock->apply_bytes;
Security readout for executives and security teams
Plain-English summary
This Linux kernel issue affects BPF sockmap socket accounting. The public record describes a kernel warning during sockmap selftests, not a confirmed business-impacting exploit chain. Treat it as a kernel maintenance risk: confirm affected kernel versions and apply vendor or stable kernel updates that include the referenced fixes.
Executive priority
Medium operational priority unless the environment heavily depends on BPF sockmap or runs affected kernels at scale. There is no source-backed evidence of active exploitation, but kernel defects can affect platform stability and should be folded into normal patch cycles.
Technical view
The flaw is tied to commit 84472b436e76, where sockmap send accounting changed from tosend to msg->sg.size. That broke sk->sk_forward_alloc accounting and triggered sk_stream_kill_queues warnings during test_sockmap. The CVE record lists Linux kernel affected versions and multiple upstream stable fix commits.
Likely exposure
Exposure is limited to systems running Linux kernel versions identified as affected in the CVE data. The source bundle does not establish remote reachability, required privileges, distribution package status, or whether common default configurations are exposed.
Exploitation context
CISA KEV status is false, and the provided sources do not report active exploitation, public exploit code, or weaponized use. Evidence is limited to kernel selftest-triggered warnings and upstream stable fixes.
Researcher notes
The record lacks CVSS, CWE, exploitability details, and privilege requirements. Analysis should focus on version mapping, patch provenance, and distribution backports rather than assumed exploit paths. The affected-version data is incomplete without vendor package advisories.
Mitigation direction
Inventory Linux kernel versions across servers, appliances, and container hosts.
Compare running kernels with the CVE record and Linux distribution advisories.
Apply vendor kernel updates or stable kernels containing the referenced fixes.
Prioritize shared hosts or systems using BPF and sockmap-related functionality.
Avoid ad hoc workarounds unless your Linux vendor documents them.
Validation and detection
Verify each host reports a kernel version outside the affected set.
Confirm installed distribution packages include the relevant upstream stable fix.
Check change records for kernel updates after the CVE publication date.
Run standard regression tests for kernel-dependent workloads after patching.
Monitor kernel logs for recurring sk_stream_kill_queues or sockmap warnings.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2022-49877 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
0CVSS vectors
3Timeline events
0ADP providers
6Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
May 1, 2025, 14:10 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.