In the Linux kernel, the following vulnerability has been resolved:
peci: cpu: Fix use-after-free in adev_release()
When auxiliarydeviceadd() returns an error, auxiliarydeviceuninit() is called, which causes refcount for device to be decremented and .release callback will be triggered.
Because adevrelease() re-calls auxiliarydeviceuninit(), it will cause use-after-free: [ 1269.455172] WARNING: CPU: 0 PID: 14267 at lib/refcount.c:28 refcountwarnsaturate+0x110/0x15 [ 1269.464007] refcountt: underflow; use-after-free.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48670.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48670.json"
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "135383396929270487917349302842651548806",
"length": 84.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c11289b34ab67ed080bbe0f1855c4938362d9cf",
"signature_type": "Function",
"id": "CVE-2022-48670-7e5dc146",
"target": {
"file": "drivers/peci/cpu.c",
"function": "unregister_adev"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"254464290862184663440037274929038336383",
"105766924253394591361193594524118811165",
"304583667576893948620000242878568931463",
"248573562490047208196975832652653025442",
"141689538253564816294535149787625168378",
"79139169116204878254376565345145902805",
"292939201025082319758709268500939018881",
"309116369447979713190197687362766118612"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c11289b34ab67ed080bbe0f1855c4938362d9cf",
"signature_type": "Line",
"id": "CVE-2022-48670-9a56b02a",
"target": {
"file": "drivers/peci/cpu.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "1102493259372039685231241929194861625",
"length": 143.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c11289b34ab67ed080bbe0f1855c4938362d9cf",
"signature_type": "Function",
"id": "CVE-2022-48670-a6b0a31f",
"target": {
"file": "drivers/peci/cpu.c",
"function": "adev_release"
}
}
]