{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-47658",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-47658"
  ],
  "published": "2024-10-09T14:03:07Z",
  "summary": "crypto: stm32/cryp - call finalize with bh disabled",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: stm32/cryp - call finalize with bh disabled\n\nThe finalize operation in interrupt mode produce a produces a spinlock\nrecursion warning. The reason is the fact that BH must be disabled\nduring this process.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-47658"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/d93a2f86b0a998aa1f0870c85a2a60a0771ef89a"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/5d734665cd5d93270731e0ff1dd673fec677f447"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/56ddb9aa3b324c2d9645b5a7343e46010cf3f6ce"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.5,
      "cvss_v3_severity": "High",
      "scenario": "AV:N - The damaging consequence is reached through the IPsec ESP receive path \u2014 a remote peer's ESP packets drive `esp_input()`, whose completion callback `esp_input_done` \u2192 `xfrm_input_resume()` is invoked by the stm32-cryp threaded IRQ handler with BH enabled. The upstream engine check that this driver violates was itself added after the same failure was hit with network traffic (iperf over IPsec).\nAC:L - The BH-enabled completion happens on every interrupt-mode request, and the recursion requires only that a NET_RX softirq land on the same CPU while `x->lock` is held \u2014 a window the attacker widens at will by sustaining ESP packet volume, controlling both sides of the race. The original reporter reproduced it with ordinary iperf load.\nPR:N - No credentials on the target are needed: ESP frames sent to a known SPI enter `esp_input()` and reach `esp_input_done` even when authentication fails, and ordinary tunnel traffic from any remote host suffices. The alternate local vector via AF_ALG is likewise available to a fully unprivileged user.\nUI:N - Triggering requires only sending network traffic to a device whose IPsec/crypto operations are backed by the STM32 CRYP accelerator; no action by any local user or administrator is involved.\nS:U - The fault is a locking-context violation contained entirely within the kernel; no VM, IOMMU, or sandbox boundary is crossed and no other security authority is affected.\nC:N - The defect is an incorrect execution context for a completion callback, not a memory-safety error \u2014 there is no out-of-bounds read, no freed-object reuse, and no path by which attacker-readable data is exposed.\nI:N - No memory is corrupted and no attacker-controlled write primitive arises; the callback simply runs with bottom halves enabled, which affects serialization rather than data content.\nA:H - Recursive acquisition of `xfrm_state->lock` from the re-entered `xfrm_input()` produces a spinlock-recursion BUG and a hard deadlock on that CPU, hanging IPsec/network processing (and panicking outright under `panic_on_warn`)."
    }
  }
}
