In the Linux kernel, the following vulnerability has been resolved:
drivers: staging: rtl8192e: Fix deadlock in rtllibbeaconsstop()
There is a deadlock in rtllibbeaconsstop(), which is shown below:
(Thread 1) | (Thread 2) | rtllibsendbeacon() rtllibbeaconsstop() | modtimer() spinlockirqsave() //(1) | (wait a time) ... | rtllibsendbeaconcb() deltimersync() | spinlockirqsave() //(2) (wait timer to stop) | ...
We hold ieee->beaconlock in position (1) of thread 1 and use deltimersync() to wait timer to stop, but timer handler also need ieee->beaconlock in position (2) of thread 2. As a result, rtllibbeaconsstop() will block forever.
This patch extracts deltimersync() from the protection of spinlockirqsave(), which could let timer handler to obtain the needed lock.
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fef451f0fbbe85dbd2962b18379d02e2965610db",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-0aa4f0fb",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4681129fda9e8555392eaaadb239ec6a6e2b3e12",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-25ca8b41",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b6bdbd9337de3917945847bde262a34a87a6303",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-2c9c8b42",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64b05fa212c7e4d057676e8b7e7120c6eb2f615b",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-2d63f34b",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f69d7d5e918aa43423d86bd17ddb11b1b5e8ada",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-33e56cb2",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@381045dc64d23a2229c47c5524c06bfc33d34446",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-3522d5bf",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4681129fda9e8555392eaaadb239ec6a6e2b3e12",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-3e490828",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@08bacf871c019163ccd1389d0bc957a43324967a",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-4202a0a8",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@46c861009bf437a18417df24cea0d181741b7d72",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-4bff84d1",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@46c861009bf437a18417df24cea0d181741b7d72",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-535962ac",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ffd4c4d5293e4985092ea45ba21cad9326e2e434",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-5d52a9ec",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fef451f0fbbe85dbd2962b18379d02e2965610db",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-5f4cacbf",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@381045dc64d23a2229c47c5524c06bfc33d34446",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-b84ad677",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9b6bdbd9337de3917945847bde262a34a87a6303",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-ba1386c7",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ffd4c4d5293e4985092ea45ba21cad9326e2e434",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-ccd496b2",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@08bacf871c019163ccd1389d0bc957a43324967a",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-dddece07",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64b05fa212c7e4d057676e8b7e7120c6eb2f615b",
"target": {
"function": "rtllib_beacons_stop",
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-de1fe218",
"signature_version": "v1",
"signature_type": "Function",
"digest": {
"length": 219.0,
"function_hash": "162084204473686808988560032162390359480"
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f69d7d5e918aa43423d86bd17ddb11b1b5e8ada",
"target": {
"file": "drivers/staging/rtl8192e/rtllib_softmac.c"
},
"deprecated": false,
"id": "CVE-2022-49315-fd4fdceb",
"signature_version": "v1",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"42165264800563504709064141245105154257",
"335490778857769804395887686304905799588",
"326106736010244996026759725804724753821",
"299292858076811818679611976043326268458",
"87909975098280032383576371827248912400"
]
}
}
]