What’s Vulnerable › Vulnerabilities

CVE-2022-49957: kcm: fix strp_init() order and cleanup

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.

Affected products

How to fix

Upgrade to a fixed version: Linux kernel 4.10, 4.14.293, 4.15, 4.19.258. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2022-49957 or the next vulnerability affects your stack