CVE-2022-49957 kcm: fix strp_init() order and cleanup
A logic error in the Linux kernel KCM module could lead to a null pointer dereference or lockdep warning, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-49957?
CVE-2022-49957 is a medium-severity vulnerability in Linux kernel, published on 18 Jun 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
kcm: fix strp_init() order and cleanup
strp_init() is called just a few lines above this csk->sk_user_data check, it also initializes strp->work etc., therefore, it is unnecessary to call strp_done() to cancel the freshly initialized work.
And if sk_user_data is already used by KCM, psock->strp should not be touched, particularly strp->work state, so we need to move strp_init() after the csk->sk_user_data check.
This also makes a lockdep warning reported by syzbot go away.
Weakness: CWE-908
Which versions are affected by CVE-2022-49957?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-49957?
Apply the vendor's patch.
Is CVE-2022-49957 being exploited?
There is no known exploitation of CVE-2022-49957 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-49957, GHSA-cp59-hf68-p4rg, UBUNTU-CVE-2022-49957.