In the Linux kernel, the following vulnerability has been resolved:
spi: Fix simplification of devmspiregister_controller
This reverts commit 59ebbe40fb51 ("spi: simplify devmspiregister_controller").
If devmaddaction() fails in devmaddactionorreset(), devmspiunregister() will be called, it decreases the refcount of 'ctlr->dev' to 0, then it will cause uaf in the drivers that calling spiputcontroller() in error path.
[
{
"signature_version": "v1",
"digest": {
"function_hash": "295842417551649861409865221314675926081",
"length": 173.0
},
"deprecated": false,
"id": "CVE-2022-50190-044dce9a",
"target": {
"function": "devm_spi_register_controller",
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@34bab623ebfc08398499e463396b81abb4abe01e",
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "295842417551649861409865221314675926081",
"length": 173.0
},
"deprecated": false,
"id": "CVE-2022-50190-2d5a3cb4",
"target": {
"function": "devm_spi_register_controller",
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@445fb9c19cf45bd9472fd9babaa31c5e6c7d2720",
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"171757930296599870729387696465796192049",
"143563198214157306559750257445276828910",
"151014433290291720135943589213869209152",
"188633455778826911161577934312209825496",
"314539499102927635771945465440064770094",
"118992021516945604817260774777611544940",
"62226714693504072220690441910717248391",
"247561796228557505916912054149234208851",
"124886696892041768945356728571260332258",
"241402109687447764831256836838340108807",
"120390046659528406547865796326139499450",
"311812779515335806979820944817729088832",
"182365983297139184316440275252967126804",
"139962575629686066729933077559961810320",
"143829156517897431982474279692279974835"
]
},
"deprecated": false,
"id": "CVE-2022-50190-6d8f459e",
"target": {
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@445fb9c19cf45bd9472fd9babaa31c5e6c7d2720",
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"171757930296599870729387696465796192049",
"143563198214157306559750257445276828910",
"151014433290291720135943589213869209152",
"188633455778826911161577934312209825496",
"314539499102927635771945465440064770094",
"118992021516945604817260774777611544940",
"62226714693504072220690441910717248391",
"247561796228557505916912054149234208851",
"124886696892041768945356728571260332258",
"241402109687447764831256836838340108807",
"120390046659528406547865796326139499450",
"311812779515335806979820944817729088832",
"182365983297139184316440275252967126804",
"139962575629686066729933077559961810320",
"143829156517897431982474279692279974835"
]
},
"deprecated": false,
"id": "CVE-2022-50190-720f3c8a",
"target": {
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0",
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "295842417551649861409865221314675926081",
"length": 173.0
},
"deprecated": false,
"id": "CVE-2022-50190-9c122514",
"target": {
"function": "devm_spi_register_controller",
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c6bd448442b6c3f6843ac70d57201a13478dd47",
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "295842417551649861409865221314675926081",
"length": 173.0
},
"deprecated": false,
"id": "CVE-2022-50190-b8563e64",
"target": {
"function": "devm_spi_register_controller",
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@43cc5a0afe4184a7fafe1eba32b5a11bb69c9ce0",
"signature_type": "Function"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"171757930296599870729387696465796192049",
"143563198214157306559750257445276828910",
"151014433290291720135943589213869209152",
"188633455778826911161577934312209825496",
"314539499102927635771945465440064770094",
"118992021516945604817260774777611544940",
"62226714693504072220690441910717248391",
"247561796228557505916912054149234208851",
"124886696892041768945356728571260332258",
"241402109687447764831256836838340108807",
"120390046659528406547865796326139499450",
"311812779515335806979820944817729088832",
"182365983297139184316440275252967126804",
"139962575629686066729933077559961810320",
"143829156517897431982474279692279974835"
]
},
"deprecated": false,
"id": "CVE-2022-50190-ca493d82",
"target": {
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c6bd448442b6c3f6843ac70d57201a13478dd47",
"signature_type": "Line"
},
{
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"171757930296599870729387696465796192049",
"143563198214157306559750257445276828910",
"151014433290291720135943589213869209152",
"188633455778826911161577934312209825496",
"314539499102927635771945465440064770094",
"118992021516945604817260774777611544940",
"62226714693504072220690441910717248391",
"247561796228557505916912054149234208851",
"124886696892041768945356728571260332258",
"241402109687447764831256836838340108807",
"120390046659528406547865796326139499450",
"311812779515335806979820944817729088832",
"182365983297139184316440275252967126804",
"139962575629686066729933077559961810320",
"143829156517897431982474279692279974835"
]
},
"deprecated": false,
"id": "CVE-2022-50190-f8f48c59",
"target": {
"file": "drivers/spi/spi.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@34bab623ebfc08398499e463396b81abb4abe01e",
"signature_type": "Line"
}
]