kcm: fix strp_init() order and cleanup (Linux Linux)

CVE-2022-49957
MEDIUM 5.5

At a glance

Source
NVD
EPSS
EPSS 0.27 % · percentile 19 ()
State
PUBLISHED
Published
Updated
Assigner
Linux
NVD status
Analyzed

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.

Weaknesses (CWE)

  • CWE-908 — Use of Uninitialized Resource

References

Scores

VersionScoreVectorScored by
CVSS 3.1MEDIUM 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HNVD · nvd@nist.gov (Primary)

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
Linux · Linuxaffected 44890e9ff771ef11777b2d1ebf8589255eb12502 < 473f394953216614087f4179e55cdf0cf616a13b ; affected e5571240236c5652f3e079b1d5866716a7ad819c < a8a0c321319ad64a5427d6172cd9c23b4d6ca1e8 ; affected e5571240236c5652f3e079b1d5866716a7ad819c < 0946ff31d1a8778787bf6708beb20f38715267cc ; affected e5571240236c5652f3e079b1d5866716a7ad819c < 1b6666964ca1de93a7bf06e122bcf3616dbd33a9 ; affected e5571240236c5652f3e079b1d5866716a7ad819c < 55fb8c3baa8071c5d533a9ad48624e44e2a04ef5 ; affected e5571240236c5652f3e079b1d5866716a7ad819c < f865976baa85915c7672f351b74d5974b93215f6
Linux · Linuxaffected 4.15 ; unaffected 0 < 4.15 ; unaffected 4.14.293 ≤ 4.14.* ; unaffected 4.19.258 ≤ 4.19.* ; unaffected 5.4.213 ≤ 5.4.* ; unaffected 5.10.142 ≤ 5.10.*

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD