CVE-2022-49877: bpf, sockmap: Fix the sk->sk_forward_alloc warning of sk_stream_kill_queues

Published May 1, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf, sockmap: Fix the sk->skforwardalloc warning of skstreamkillqueues

When running testsockmap selftests, the following warning appears:

WARNING: CPU: 2 PID: 197 at net/core/stream.c:205 skstreamkillqueues+0xd3/0xf0 Call Trace: <TASK> inetcskdestroysock+0x55/0x110 tcprcvstateprocess+0xd28/0x1380 ? tcpv4dorcv+0x77/0x2c0 tcpv4dorcv+0x77/0x2c0 releasesock+0x106/0x130 tcpclose+0x1a7/0x4e0 tcpclose+0x20/0x70 inetrelease+0x3c/0x80 sockrelease+0x3a/0xb0 sockclose+0x14/0x20 fput+0xa3/0x260 taskworkrun+0x59/0xb0 exittousermodeprepare+0x1b3/0x1c0 syscallexittousermode+0x19/0x50 dosyscall64+0x48/0x90 entrySYSCALL64afterhwframe+0x44/0xae

The root case is in commit 84472b436e76 ("bpf, sockmap: Fix more uncharged while msg has moredata"), where I used msg->sg.size to replace the tosend, causing breakage:

if (msg->applybytes && msg->applybytes < tosend) tosend = psock->applybytes;

Affected Software

10 affected components
Linux Linux kernel
Linux Linux kernel>=5.4.189<5.4.225
Linux Linux kernel>=5.10.110<5.10.155
Linux Linux kernel>=5.15.33<5.15.79
Linux Linux kernel>=5.16.19<5.17
Linux Linux kernel>=5.17.2<6.0.9
Linux Linux kernel=6.1-rc1
Linux Linux kernel=6.1-rc2
Linux Linux kernel=6.1-rc3
Linux Linux kernel=6.1-rc4

Event History

May 1, 2025
CVE Published
via MITRE·02:10 PM
Data Sourced
via MITRE·02:10 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-49877?

CVE-2022-49877 has been classified as a moderate severity vulnerability.

2

How do I fix CVE-2022-49877?

To fix CVE-2022-49877, you should update to the latest version of the Linux Kernel where the vulnerability has been resolved.

3

What systems are affected by CVE-2022-49877?

CVE-2022-49877 affects the Linux Kernel across various distributions that utilize the impacted version.

4

What kind of vulnerability is CVE-2022-49877?

CVE-2022-49877 is related to a warning issue in the BPF and sockmap components of the Linux kernel.

5

When was CVE-2022-49877 reported?

CVE-2022-49877 was reported in 2022 as part of ongoing security assessments in the Linux Kernel.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203