In the Linux kernel, the following vulnerability has been resolved:
bus: fsl-mc-bus: fix KASAN use-after-free in fslmcbus_remove()
In fslmcbusremove(), mc->rootmcbusdev->mcio is passed to fsldestroymcio(). However, mc->rootmcbusdev is already freed in fslmcdeviceremove(). Then reference to mc->rootmcbusdev->mcio triggers KASAN use-after-free. To avoid the use-after-free, keep the reference to mc->rootmcbusdev->mcio in a local variable and pass to fsldestroymc_io().
This patch needs rework to apply to kernels older than v5.15.
[
{
"signature_version": "v1",
"digest": {
"length": 494.0,
"function_hash": "63095571807718233198204349513388643188"
},
"signature_type": "Function",
"id": "CVE-2022-49711-06d4f052",
"target": {
"file": "drivers/bus/fsl-mc/fsl-mc-bus.c",
"function": "fsl_mc_bus_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@928ea98252ad75118950941683893cf904541da9",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"63054497753430144161801977466513530863",
"24570148873127079511524512717258904141",
"213926021983304812852119452702904937045",
"325364203227351268272707417722643968499",
"189948504339970452754973432991492902882",
"102151292550591100600475302613326688154",
"156843340324145377863652981758698131175",
"80738484584230800722228079140471917212",
"166337810354065006595798601934890347769"
]
},
"signature_type": "Line",
"id": "CVE-2022-49711-1609e232",
"target": {
"file": "drivers/bus/fsl-mc/fsl-mc-bus.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@161b68b0a728377aaa10a8e14c70e7734f3c9ff7",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 494.0,
"function_hash": "63095571807718233198204349513388643188"
},
"signature_type": "Function",
"id": "CVE-2022-49711-33d99147",
"target": {
"file": "drivers/bus/fsl-mc/fsl-mc-bus.c",
"function": "fsl_mc_bus_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@161b68b0a728377aaa10a8e14c70e7734f3c9ff7",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"63054497753430144161801977466513530863",
"24570148873127079511524512717258904141",
"213926021983304812852119452702904937045",
"325364203227351268272707417722643968499",
"189948504339970452754973432991492902882",
"102151292550591100600475302613326688154",
"156843340324145377863652981758698131175",
"80738484584230800722228079140471917212",
"166337810354065006595798601934890347769"
]
},
"signature_type": "Line",
"id": "CVE-2022-49711-3b2f18a5",
"target": {
"file": "drivers/bus/fsl-mc/fsl-mc-bus.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@928ea98252ad75118950941683893cf904541da9",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"length": 494.0,
"function_hash": "63095571807718233198204349513388643188"
},
"signature_type": "Function",
"id": "CVE-2022-49711-972fde42",
"target": {
"file": "drivers/bus/fsl-mc/fsl-mc-bus.c",
"function": "fsl_mc_bus_remove"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ccd1751092341ac120a961835211f9f2e3735963",
"deprecated": false
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"63054497753430144161801977466513530863",
"24570148873127079511524512717258904141",
"213926021983304812852119452702904937045",
"325364203227351268272707417722643968499",
"189948504339970452754973432991492902882",
"102151292550591100600475302613326688154",
"156843340324145377863652981758698131175",
"80738484584230800722228079140471917212",
"166337810354065006595798601934890347769"
]
},
"signature_type": "Line",
"id": "CVE-2022-49711-c46e7e9d",
"target": {
"file": "drivers/bus/fsl-mc/fsl-mc-bus.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ccd1751092341ac120a961835211f9f2e3735963",
"deprecated": false
}
]