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.
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"254464290862184663440037274929038336383",
"105766924253394591361193594524118811165",
"304583667576893948620000242878568931463",
"248573562490047208196975832652653025442",
"141689538253564816294535149787625168378",
"79139169116204878254376565345145902805",
"292939201025082319758709268500939018881",
"309116369447979713190197687362766118612"
]
},
"target": {
"file": "drivers/peci/cpu.c"
},
"id": "CVE-2022-48670-2d350874",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c87f1f99e26ea4ae08cabe753ae98e5626bdba89",
"signature_type": "Line"
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "1102493259372039685231241929194861625",
"length": 143.0
},
"target": {
"function": "adev_release",
"file": "drivers/peci/cpu.c"
},
"id": "CVE-2022-48670-5ca632c1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c87f1f99e26ea4ae08cabe753ae98e5626bdba89",
"signature_type": "Function"
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "135383396929270487917349302842651548806",
"length": 84.0
},
"target": {
"function": "unregister_adev",
"file": "drivers/peci/cpu.c"
},
"id": "CVE-2022-48670-7e5dc146",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c11289b34ab67ed080bbe0f1855c4938362d9cf",
"signature_type": "Function"
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"254464290862184663440037274929038336383",
"105766924253394591361193594524118811165",
"304583667576893948620000242878568931463",
"248573562490047208196975832652653025442",
"141689538253564816294535149787625168378",
"79139169116204878254376565345145902805",
"292939201025082319758709268500939018881",
"309116369447979713190197687362766118612"
]
},
"target": {
"file": "drivers/peci/cpu.c"
},
"id": "CVE-2022-48670-9a56b02a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c11289b34ab67ed080bbe0f1855c4938362d9cf",
"signature_type": "Line"
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "1102493259372039685231241929194861625",
"length": 143.0
},
"target": {
"function": "adev_release",
"file": "drivers/peci/cpu.c"
},
"id": "CVE-2022-48670-a6b0a31f",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1c11289b34ab67ed080bbe0f1855c4938362d9cf",
"signature_type": "Function"
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "135383396929270487917349302842651548806",
"length": 84.0
},
"target": {
"function": "unregister_adev",
"file": "drivers/peci/cpu.c"
},
"id": "CVE-2022-48670-fd6ed159",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c87f1f99e26ea4ae08cabe753ae98e5626bdba89",
"signature_type": "Function"
}
]