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->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
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2022-49877?
CVE-2022-49877 has been classified as a moderate severity vulnerability.
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.
What systems are affected by CVE-2022-49877?
CVE-2022-49877 affects the Linux Kernel across various distributions that utilize the impacted version.
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.
When was CVE-2022-49877 reported?
CVE-2022-49877 was reported in 2022 as part of ongoing security assessments in the Linux Kernel.