In the Linux kernel, the following vulnerability has been resolved:
kcm: fix strp_init() order and cleanup
strpinit() is called just a few lines above this csk->skuserdata check, it also initializes strp->work etc., therefore, it is unnecessary to call strpdone() to cancel the freshly initialized work.
And if skuserdata is already used by KCM, psock->strp should not be touched, particularly strp->work state, so we need to move strpinit() after the csk->skuser_data check.
This also makes a lockdep warning reported by syzbot go away.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55fb8c3baa8071c5d533a9ad48624e44e2a04ef5",
"id": "CVE-2022-49957-0c839804",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8fc29ff3910f3af08a7c40a75d436b5720efe2bf",
"id": "CVE-2022-49957-2e683fb5",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8fc29ff3910f3af08a7c40a75d436b5720efe2bf",
"id": "CVE-2022-49957-39a938ff",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f865976baa85915c7672f351b74d5974b93215f6",
"id": "CVE-2022-49957-4802aff0",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8a0c321319ad64a5427d6172cd9c23b4d6ca1e8",
"id": "CVE-2022-49957-486ad8c6",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0946ff31d1a8778787bf6708beb20f38715267cc",
"id": "CVE-2022-49957-4a9b65ff",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f865976baa85915c7672f351b74d5974b93215f6",
"id": "CVE-2022-49957-599cbfdf",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@473f394953216614087f4179e55cdf0cf616a13b",
"id": "CVE-2022-49957-7ff43725",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0946ff31d1a8778787bf6708beb20f38715267cc",
"id": "CVE-2022-49957-a3f09096",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@55fb8c3baa8071c5d533a9ad48624e44e2a04ef5",
"id": "CVE-2022-49957-af17728c",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1b6666964ca1de93a7bf06e122bcf3616dbd33a9",
"id": "CVE-2022-49957-c241d451",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1b6666964ca1de93a7bf06e122bcf3616dbd33a9",
"id": "CVE-2022-49957-cb92fbf1",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a8a0c321319ad64a5427d6172cd9c23b4d6ca1e8",
"id": "CVE-2022-49957-cd21475b",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "kcm_attach",
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Function",
"digest": {
"length": 1985.0,
"function_hash": "283157450224253987994016418657927950129"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@473f394953216614087f4179e55cdf0cf616a13b",
"id": "CVE-2022-49957-f945df01",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "net/kcm/kcmsock.c"
},
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"193804414983186293641710514097017078510",
"140359009089014955045408072623924190333",
"188200068958203380765877781218050161283",
"324485776806921908359370082208078395331",
"71811897806961435218583467760205553738",
"167935681629530586017776421530900173068",
"128308039390364861035477475876883281909",
"159379271622728420031023128055906979020",
"29632995426761746844303877177785901743",
"54002861836475643313924777756898301562",
"162068079608145003853579249966917029491",
"280931964540120012751900343015291840120",
"202329570860399474075145287466214326973",
"297868298396535478639248217838213515887",
"268448030573613670912102937020535598892",
"323005821302564321025787243046070207945",
"283977364116432772538416223398815349180"
]
}
}
]