In the Linux kernel, the following vulnerability has been resolved:
pinctrl: fix deadlock in createpinctrl() when handling -EPROBEDEFER
In createpinctrl(), pinctrlmapsmutex is acquired before calling addsetting(). If addsetting() returns -EPROBEDEFER, createpinctrl() calls pinctrlfree(). However, pinctrlfree() attempts to acquire pinctrlmapsmutex, which is already held by createpinctrl(), leading to a potential deadlock.
This patch resolves the issue by releasing pinctrlmapsmutex before calling pinctrl_free(), preventing the deadlock.
This bug was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-0fbd133e",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4038c57bf61631219b31f1bd6e92106ec7f084dc",
"signature_type": "Line"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-2a4c2eca",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a7a7c9571c3e62f17012dd7f2063e926179ddd",
"signature_type": "Line"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-2baedd83",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e65a0dc2e85efb28e182aca50218e8a056d0ce04",
"signature_type": "Line"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-33b8201b",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adec57ff8e66aee632f3dd1f93787c13d112b7a1",
"signature_type": "Line"
},
{
"digest": {
"function_hash": "122226066933426870874028894987568446611",
"length": 1091.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-57834908",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4038c57bf61631219b31f1bd6e92106ec7f084dc",
"signature_type": "Function"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-66545464",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b813e3fd102a959c5b208ed68afe27e0137a561b",
"signature_type": "Line"
},
{
"digest": {
"function_hash": "80210011234626624569531474915648730658",
"length": 1106.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-66a3f094",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@01fe2f885f7813f8aed5d3704b384a97b1116a9e",
"signature_type": "Function"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-6a4fa266",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@420ce1261907e5dbeda1e4daffd5b6c76f8188c0",
"signature_type": "Line"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-76f06284",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b36efd2e3e22a329444b6b24fa48df6d20ae66e6",
"signature_type": "Line"
},
{
"digest": {
"function_hash": "80210011234626624569531474915648730658",
"length": 1106.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-7c9f6824",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b36efd2e3e22a329444b6b24fa48df6d20ae66e6",
"signature_type": "Function"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"29585332283632521655632678779777730420",
"211311891732665300824201076031370201284",
"74182469718188191855671877524617100041",
"179788669436334533689680841562265525437",
"40142753523098548329548574320440147118"
]
},
"target": {
"file": "drivers/pinctrl/core.c"
},
"signature_version": "v1",
"id": "CVE-2024-42090-8a7500de",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@01fe2f885f7813f8aed5d3704b384a97b1116a9e",
"signature_type": "Line"
},
{
"digest": {
"function_hash": "80210011234626624569531474915648730658",
"length": 1106.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-b5167eea",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b813e3fd102a959c5b208ed68afe27e0137a561b",
"signature_type": "Function"
},
{
"digest": {
"function_hash": "122226066933426870874028894987568446611",
"length": 1091.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-ba786061",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@48a7a7c9571c3e62f17012dd7f2063e926179ddd",
"signature_type": "Function"
},
{
"digest": {
"function_hash": "122226066933426870874028894987568446611",
"length": 1091.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-c9ed07fd",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@adec57ff8e66aee632f3dd1f93787c13d112b7a1",
"signature_type": "Function"
},
{
"digest": {
"function_hash": "80210011234626624569531474915648730658",
"length": 1106.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-d75e7b82",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e65a0dc2e85efb28e182aca50218e8a056d0ce04",
"signature_type": "Function"
},
{
"digest": {
"function_hash": "80210011234626624569531474915648730658",
"length": 1106.0
},
"target": {
"file": "drivers/pinctrl/core.c",
"function": "create_pinctrl"
},
"signature_version": "v1",
"id": "CVE-2024-42090-e56ea0e6",
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@420ce1261907e5dbeda1e4daffd5b6c76f8188c0",
"signature_type": "Function"
}
]