Skip to content
Heist/ feed
Back to feed
UnratedFix available

riscv: kexec: Avoid deadlock in kexec crash path

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: riscv: kexec: Avoid deadlock in kexec crash path If the kexec crash code is called in the interrupt context, the machine_kexec_mask_interrupts() function will trigger a deadlock while trying to acquire the irqdesc spinlock and then deactivate irqchip in irq_set_irqchip_state() function. Unlike arm64, riscv only requires irq_eoi handler to complete EOI and keeping irq_set_irqchip_state() will only leave this possible deadlock without any use. So we simply remove it.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.15.163, 6.1.98, 6.6.39, 6.9.9
CVEs
CVE-2024-42140
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:59 UTC · Revision 1

Source evidence

riscv: kexec: Avoid deadlock in kexec crash path

core-osv · Original source

Published 30 Jul 2024, 07:46 UTC

In the Linux kernel, the following vulnerability has been resolved: riscv: kexec: Avoid deadlock in kexec crash path If the kexec crash code is called in the interrupt context, the machine_kexec_mask_interrupts() function will trigger a deadlock while trying to acquire the irqdesc spinlock and then deactivate irqchip in irq_set_irqchip_state() function. Unlike arm64, riscv only requires irq_eoi handler to complete EOI and keeping irq_set_irqchip_state() will only leave this possible deadlock without any use. So we simply remove it.

osv:CVE-2024-42140

Kernel

Fixed versions: 5.15.163, 6.1.98, 6.6.39, 6.9.9

Complete source record
{
  "id": "3a92028a5ef2edcede655c9d6d96e9a21a57e6213617bdd80fa05da93b622efd",
  "url": "https://osv.dev/vulnerability/CVE-2024-42140",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "riscv: kexec: Avoid deadlock in kexec crash path",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: riscv: kexec: Avoid deadlock in kexec crash path If the kexec crash code is called in the interrupt context, the machine_kexec_mask_interrupts() function will trigger a deadlock while trying to acquire the irqdesc spinlock and then deactivate irqchip in irq_set_irqchip_state() function. Unlike arm64, riscv only requires irq_eoi handler to complete EOI and keeping irq_set_irqchip_state() will only leave this possible deadlock without any use. So we simply remove it.",
    "evidence": "osv:CVE-2024-42140",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.15.163",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.98",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.39",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.9.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-42140",
      "aliases": [
        "CVE-2024-42140"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "12f237200c169a8667cf9dca7a40df8d7917b9fd"
                },
                {
                  "fixed": "bb80a7911218bbab2a69b5db7d2545643ab0073d"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "b17d19a5314a37f7197afd1a0200affd21a7227d"
                },
                {
                  "fixed": "653deee48a4682ea17a05b96fb6842795ab5943c"
                },
                {
                  "fixed": "7692c9b6baacdee378435f58f19baf0eb69e4155"
                },
                {
                  "fixed": "484dd545271d02d1571e1c6b62ea7df9dbe5e692"
                },
                {
                  "fixed": "c562ba719df570c986caf0941fea2449150bcbc4"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5.15.82"
                },
                {
                  "fixed": "5.15.163"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6.0.12"
                },
                {
                  "fixed": "6.1"
                }
              ]
            },
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "7594956fec8902dfc18150bf1dca0940cd4ad025"
                }
              ]
            }
          ],
          "versions": [
            "v5.15.162",
            "v5.15.161",
            "v5.15.160",
            "v5.15.159",
            "v5.15.158",
            "v5.15.157",
            "v5.15.156",
            "v5.15.155",
            "v5.15.154",
            "v5.15.153",
            "v5.15.152",
            "v5.15.151",
            "v5.15.150",
            "v5.15.149",
            "v5.15.148",
            "v5.15.147",
            "v5.15.146",
            "v5.15.145",
            "v5.15.144",
            "v5.15.143",
            "v5.15.142",
            "v5.15.141",
            "v5.15.140",
            "v5.15.139",
            "v5.15.138",
            "v5.15.137",
            "v5.15.136",
            "v5.15.135",
            "v5.15.134",
            "v5.15.133",
            "v5.15.132",
            "v5.15.131",
            "v5.15.130",
            "v5.15.129",
            "v5.15.128",
            "v5.15.127",
            "v5.15.126",
            "v5.15.125",
            "v5.15.124",
            "v5.15.123",
            "v5.15.122",
            "v5.15.121",
            "v5.15.120",
            "v5.15.119",
            "v5.15.118",
            "v5.15.117",
            "v5.15.116",
            "v5.15.115",
            "v5.15.114",
            "v5.15.113",
            "v5.15.112",
            "v5.15.111",
            "v5.15.110",
            "v5.15.109",
            "v5.15.108",
            "v5.15.107",
            "v5.15.106",
            "v5.15.105",
            "v5.15.104",
            "v5.15.103",
            "v5.15.102",
            "v5.15.101",
            "v5.15.100",
            "v5.15.99",
            "v5.15.98",
            "v5.15.97",
            "v5.15.96",
            "v5.15.95",
            "v5.15.94",
            "v5.15.93",
            "v5.15.92",
            "v5.15.91",
            "v5.15.90",
            "v5.15.89",
            "v5.15.88",
            "v5.15.87",
            "v5.15.86",
            "v5.15.85",
            "v5.15.84",
            "v5.15.83",
            "v5.15.82",
            "v6.0.19",
            "v6.0.18",
            "v6.0.17",
            "v6.0.16",
            "v6.0.15",
            "v6.0.14",
            "v6.0.13",
            "v6.0.12"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42140.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "5.15.163"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.98"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.1.0"
                },
                {
                  "fixed": "6.6.39"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.9.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-42140.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.982825549Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/484dd545271d02d1571e1c6b62ea7df9dbe5e692",
        "https://git.kernel.org/stable/c/653deee48a4682ea17a05b96fb6842795ab5943c",
        "https://git.kernel.org/stable/c/7692c9b6baacdee378435f58f19baf0eb69e4155",
        "https://git.kernel.org/stable/c/bb80a7911218bbab2a69b5db7d2545643ab0073d",
        "https://git.kernel.org/stable/c/c562ba719df570c986caf0941fea2449150bcbc4",
        "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42140.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-42140",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42140.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-42140",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 505037,
  "published_at": "2024-07-30T07:46:34.26+00:00"
}