cve-2024-26725
Vulnerability from cvelistv5
Published
2024-04-03 14:55
Modified
2024-09-11 17:32
Severity
Summary
dpll: fix possible deadlock during netlink dump operation
Impacted products
VendorProduct
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:14:12.969Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/087739cbd0d0b87b6cec2c0799436ac66e24acc8"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/53c0441dd2c44ee93fddb5473885fd41e4bc2361"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26725",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T15:52:13.550439Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:32:52.134Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "Documentation/netlink/specs/dpll.yaml",
            "drivers/dpll/dpll_netlink.c",
            "drivers/dpll/dpll_nl.c",
            "drivers/dpll/dpll_nl.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "087739cbd0d0",
              "status": "affected",
              "version": "9d71b54b65b1",
              "versionType": "git"
            },
            {
              "lessThan": "53c0441dd2c4",
              "status": "affected",
              "version": "9d71b54b65b1",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "Documentation/netlink/specs/dpll.yaml",
            "drivers/dpll/dpll_netlink.c",
            "drivers/dpll/dpll_nl.c",
            "drivers/dpll/dpll_nl.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.7"
            },
            {
              "lessThan": "6.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.6",
              "versionType": "custom"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.8",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ndpll: fix possible deadlock during netlink dump operation\n\nRecently, I\u0027ve been hitting following deadlock warning during dpll pin\ndump:\n\n[52804.637962] ======================================================\n[52804.638536] WARNING: possible circular locking dependency detected\n[52804.639111] 6.8.0-rc2jiri+ #1 Not tainted\n[52804.639529] ------------------------------------------------------\n[52804.640104] python3/2984 is trying to acquire lock:\n[52804.640581] ffff88810e642678 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}, at: netlink_dump+0xb3/0x780\n[52804.641417]\n               but task is already holding lock:\n[52804.642010] ffffffff83bde4c8 (dpll_lock){+.+.}-{3:3}, at: dpll_lock_dumpit+0x13/0x20\n[52804.642747]\n               which lock already depends on the new lock.\n\n[52804.643551]\n               the existing dependency chain (in reverse order) is:\n[52804.644259]\n               -\u003e #1 (dpll_lock){+.+.}-{3:3}:\n[52804.644836]        lock_acquire+0x174/0x3e0\n[52804.645271]        __mutex_lock+0x119/0x1150\n[52804.645723]        dpll_lock_dumpit+0x13/0x20\n[52804.646169]        genl_start+0x266/0x320\n[52804.646578]        __netlink_dump_start+0x321/0x450\n[52804.647056]        genl_family_rcv_msg_dumpit+0x155/0x1e0\n[52804.647575]        genl_rcv_msg+0x1ed/0x3b0\n[52804.648001]        netlink_rcv_skb+0xdc/0x210\n[52804.648440]        genl_rcv+0x24/0x40\n[52804.648831]        netlink_unicast+0x2f1/0x490\n[52804.649290]        netlink_sendmsg+0x36d/0x660\n[52804.649742]        __sock_sendmsg+0x73/0xc0\n[52804.650165]        __sys_sendto+0x184/0x210\n[52804.650597]        __x64_sys_sendto+0x72/0x80\n[52804.651045]        do_syscall_64+0x6f/0x140\n[52804.651474]        entry_SYSCALL_64_after_hwframe+0x46/0x4e\n[52804.652001]\n               -\u003e #0 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}:\n[52804.652650]        check_prev_add+0x1ae/0x1280\n[52804.653107]        __lock_acquire+0x1ed3/0x29a0\n[52804.653559]        lock_acquire+0x174/0x3e0\n[52804.653984]        __mutex_lock+0x119/0x1150\n[52804.654423]        netlink_dump+0xb3/0x780\n[52804.654845]        __netlink_dump_start+0x389/0x450\n[52804.655321]        genl_family_rcv_msg_dumpit+0x155/0x1e0\n[52804.655842]        genl_rcv_msg+0x1ed/0x3b0\n[52804.656272]        netlink_rcv_skb+0xdc/0x210\n[52804.656721]        genl_rcv+0x24/0x40\n[52804.657119]        netlink_unicast+0x2f1/0x490\n[52804.657570]        netlink_sendmsg+0x36d/0x660\n[52804.658022]        __sock_sendmsg+0x73/0xc0\n[52804.658450]        __sys_sendto+0x184/0x210\n[52804.658877]        __x64_sys_sendto+0x72/0x80\n[52804.659322]        do_syscall_64+0x6f/0x140\n[52804.659752]        entry_SYSCALL_64_after_hwframe+0x46/0x4e\n[52804.660281]\n               other info that might help us debug this:\n\n[52804.661077]  Possible unsafe locking scenario:\n\n[52804.661671]        CPU0                    CPU1\n[52804.662129]        ----                    ----\n[52804.662577]   lock(dpll_lock);\n[52804.662924]                                lock(nlk_cb_mutex-GENERIC);\n[52804.663538]                                lock(dpll_lock);\n[52804.664073]   lock(nlk_cb_mutex-GENERIC);\n[52804.664490]\n\nThe issue as follows: __netlink_dump_start() calls control-\u003estart(cb)\nwith nlk-\u003ecb_mutex held. In control-\u003estart(cb) the dpll_lock is taken.\nThen nlk-\u003ecb_mutex is released and taken again in netlink_dump(), while\ndpll_lock still being held. That leads to ABBA deadlock when another\nCPU races with the same operation.\n\nFix this by moving dpll_lock taking into dumpit() callback which ensures\ncorrect lock taking order."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-05-29T05:21:34.603Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/087739cbd0d0b87b6cec2c0799436ac66e24acc8"
        },
        {
          "url": "https://git.kernel.org/stable/c/53c0441dd2c44ee93fddb5473885fd41e4bc2361"
        }
      ],
      "title": "dpll: fix possible deadlock during netlink dump operation",
      "x_generator": {
        "engine": "bippy-a5840b7849dd"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26725",
    "datePublished": "2024-04-03T14:55:24.074Z",
    "dateReserved": "2024-02-19T14:20:24.163Z",
    "dateUpdated": "2024-09-11T17:32:52.134Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-26725\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-04-03T15:15:54.257\",\"lastModified\":\"2024-04-03T17:24:18.150\",\"vulnStatus\":\"Awaiting Analysis\",\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ndpll: fix possible deadlock during netlink dump operation\\n\\nRecently, I\u0027ve been hitting following deadlock warning during dpll pin\\ndump:\\n\\n[52804.637962] ======================================================\\n[52804.638536] WARNING: possible circular locking dependency detected\\n[52804.639111] 6.8.0-rc2jiri+ #1 Not tainted\\n[52804.639529] ------------------------------------------------------\\n[52804.640104] python3/2984 is trying to acquire lock:\\n[52804.640581] ffff88810e642678 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}, at: netlink_dump+0xb3/0x780\\n[52804.641417]\\n               but task is already holding lock:\\n[52804.642010] ffffffff83bde4c8 (dpll_lock){+.+.}-{3:3}, at: dpll_lock_dumpit+0x13/0x20\\n[52804.642747]\\n               which lock already depends on the new lock.\\n\\n[52804.643551]\\n               the existing dependency chain (in reverse order) is:\\n[52804.644259]\\n               -\u003e #1 (dpll_lock){+.+.}-{3:3}:\\n[52804.644836]        lock_acquire+0x174/0x3e0\\n[52804.645271]        __mutex_lock+0x119/0x1150\\n[52804.645723]        dpll_lock_dumpit+0x13/0x20\\n[52804.646169]        genl_start+0x266/0x320\\n[52804.646578]        __netlink_dump_start+0x321/0x450\\n[52804.647056]        genl_family_rcv_msg_dumpit+0x155/0x1e0\\n[52804.647575]        genl_rcv_msg+0x1ed/0x3b0\\n[52804.648001]        netlink_rcv_skb+0xdc/0x210\\n[52804.648440]        genl_rcv+0x24/0x40\\n[52804.648831]        netlink_unicast+0x2f1/0x490\\n[52804.649290]        netlink_sendmsg+0x36d/0x660\\n[52804.649742]        __sock_sendmsg+0x73/0xc0\\n[52804.650165]        __sys_sendto+0x184/0x210\\n[52804.650597]        __x64_sys_sendto+0x72/0x80\\n[52804.651045]        do_syscall_64+0x6f/0x140\\n[52804.651474]        entry_SYSCALL_64_after_hwframe+0x46/0x4e\\n[52804.652001]\\n               -\u003e #0 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}:\\n[52804.652650]        check_prev_add+0x1ae/0x1280\\n[52804.653107]        __lock_acquire+0x1ed3/0x29a0\\n[52804.653559]        lock_acquire+0x174/0x3e0\\n[52804.653984]        __mutex_lock+0x119/0x1150\\n[52804.654423]        netlink_dump+0xb3/0x780\\n[52804.654845]        __netlink_dump_start+0x389/0x450\\n[52804.655321]        genl_family_rcv_msg_dumpit+0x155/0x1e0\\n[52804.655842]        genl_rcv_msg+0x1ed/0x3b0\\n[52804.656272]        netlink_rcv_skb+0xdc/0x210\\n[52804.656721]        genl_rcv+0x24/0x40\\n[52804.657119]        netlink_unicast+0x2f1/0x490\\n[52804.657570]        netlink_sendmsg+0x36d/0x660\\n[52804.658022]        __sock_sendmsg+0x73/0xc0\\n[52804.658450]        __sys_sendto+0x184/0x210\\n[52804.658877]        __x64_sys_sendto+0x72/0x80\\n[52804.659322]        do_syscall_64+0x6f/0x140\\n[52804.659752]        entry_SYSCALL_64_after_hwframe+0x46/0x4e\\n[52804.660281]\\n               other info that might help us debug this:\\n\\n[52804.661077]  Possible unsafe locking scenario:\\n\\n[52804.661671]        CPU0                    CPU1\\n[52804.662129]        ----                    ----\\n[52804.662577]   lock(dpll_lock);\\n[52804.662924]                                lock(nlk_cb_mutex-GENERIC);\\n[52804.663538]                                lock(dpll_lock);\\n[52804.664073]   lock(nlk_cb_mutex-GENERIC);\\n[52804.664490]\\n\\nThe issue as follows: __netlink_dump_start() calls control-\u003estart(cb)\\nwith nlk-\u003ecb_mutex held. In control-\u003estart(cb) the dpll_lock is taken.\\nThen nlk-\u003ecb_mutex is released and taken again in netlink_dump(), while\\ndpll_lock still being held. That leads to ABBA deadlock when another\\nCPU races with the same operation.\\n\\nFix this by moving dpll_lock taking into dumpit() callback which ensures\\ncorrect lock taking order.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: dpll: soluciona un posible punto muerto durante la operaci\u00f3n de volcado de netlink Recientemente, he estado recibiendo la siguiente advertencia de punto muerto durante el volcado de pin de dpll: [52804.637962] =========== =========================================== [52804.638536] ADVERTENCIA: posible circular dependencia de bloqueo detectada [52804.639111] 6.8.0-rc2jiri+ #1 No contaminado [52804.639529] -------------------------------- ---------------------- [52804.640104] python3/2984 est\u00e1 intentando adquirir el bloqueo: [52804.640581] ffff88810e642678 (nlk_cb_mutex-GENERIC){+.+.}- {3:3}, en: netlink_dump+0xb3/0x780 [52804.641417] pero la tarea ya mantiene el bloqueo: [52804.642010] ffffffff83bde4c8 (dpll_lock){+.+.}-{3:3}, en: dpll_lock_dumpit+0x13/0x20 [52804.642747] qu\u00e9 bloqueo ya depende del nuevo bloqueo. [52804.643551] la cadena de dependencia existente (en orden inverso) es: [52804.644259] -\u0026gt; #1 (dpll_lock){+.+.}-{3:3}: [52804.644836] lock_acquire+0x174/0x3e0 [52804.645271] __mutex_lock+ 0x119/0x1150 [52804.645723] dpll_lock_dumpit+0x13/0x20 [52804.646169] genl_start+0x266/0x320 [52804.646578] __netlink_dump_start+0x321/0x450 [52804.647056 ] genl_family_rcv_msg_dumpit+0x155/0x1e0 [52804.647575] genl_rcv_msg+0x1ed/0x3b0 [52804.648001] netlink_rcv_skb+0xdc/ 0x210 [52804.648440] genl_rcv+0x24/0x40 [52804.648831] netlink_unicast+0x2f1/0x490 [52804.649290] netlink_sendmsg+0x36d/0x660 [52804.649742] __sock_sendmsg +0x73/0xc0 [52804.650165] __sys_sendto+0x184/0x210 [52804.650597] __x64_sys_sendto+0x72/0x80 [ 52804.651045] do_syscall_64+0x6f/0x140 [52804.651474] Entry_SYSCALL_64_after_hwframe+0x46/0x4e [52804.652001] -\u0026gt; #0 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}: [52804.6 52650] check_prev_add+0x1ae/0x1280 [52804.653107 ] __lock_acquire+0x1ed3/0x29a0 [52804.653559] lock_acquire+0x174/0x3e0 [52804.653984] __mutex_lock+0x119/0x1150 [52804.654423] netlink_dump+0xb3/0x780 [52804.654 845] __netlink_dump_start+0x389/0x450 [52804.655321] genl_family_rcv_msg_dumpit+0x155/0x1e0 [52804.655842] genl_rcv_msg +0x1ed/0x3b0 [52804.656272] netlink_rcv_skb+0xdc/0x210 [52804.656721] genl_rcv+0x24/0x40 [52804.657119] netlink_unicast+0x2f1/0x490 [52804.657570] netlink_sendm sg+0x36d/0x660 [52804.658022] __sock_sendmsg+0x73/0xc0 [52804.658450] __sys_sendto+0x184 /0x210 [52804.658877] __x64_sys_sendto+0x72/0x80 [52804.659322] do_syscall_64+0x6f/0x140 [52804.659752] Entry_SYSCALL_64_after_hwframe+0x46/0x4e [52804.66 0281] otra informaci\u00f3n que podr\u00eda ayudarnos a depurar esto: [52804.661077] Posible escenario de bloqueo inseguro: [52804.661671] CPU0 CPU1 [52804.662129] ---- ---- [52804.662577] bloqueo(dpll_lock); [52804.662924] bloqueo (nlk_cb_mutex-GENERIC); [52804.663538] bloqueo(dpll_lock); [52804.664073] bloqueo (nlk_cb_mutex-GENERIC); [52804.664490] El problema es el siguiente: __netlink_dump_start() llama a control-\u0026gt;start(cb) con nlk-\u0026gt;cb_mutex retenido. En control-\u0026gt;start(cb) se toma dpll_lock. Luego, nlk-\u0026gt;cb_mutex se libera y se toma nuevamente en netlink_dump(), mientras dpll_lock a\u00fan se mantiene. Eso lleva a un punto muerto de ABBA cuando otra CPU corre con la misma operaci\u00f3n. Solucione este problema moviendo dpll_lock a la devoluci\u00f3n de llamada dumpit(), lo que garantiza el orden correcto de toma de bloqueo.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/087739cbd0d0b87b6cec2c0799436ac66e24acc8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/53c0441dd2c44ee93fddb5473885fd41e4bc2361\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...