data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-47658 in the interactive tracker

CVE-2024-47658

crypto: stm32/cryp - call finalize with bh disabled

7.5 EPSS 0.5% AV:N

Published 2024-10-09 (2 years ago) by the Linux kernel CNA. Subsystem drivers/crypto. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2024-47658 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication.
Debian 13trixiefixed6.10.9-1Update the kernel and reboot. Fixed in 6.10.9-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.10.9-1Update the kernel and reboot. Fixed in 6.10.9-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.10.9-1Update the kernel and reboot. Fixed in 6.10.9-1. A running kernel keeps the old code until the machine restarts.

The vulnerability

What the bug is

The finalize operation in interrupt mode produce a produces a spinlock recursion warning. The reason is the fact that BH must be disabled during this process.

Where it lives

The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.

drivers/crypto/stm32/stm32-cryp.c

What this is
CRYPTO APIMAINTAINERS section matched on drivers/crypto/ · linux-crypto@vger.kernel.org · Maintained
Kernel module
stm32_cryp

Check it on the machine

grep -wE 'CONFIG_ARCH_STM32|CONFIG_CRYPTO|CONFIG_CRYPTO_DEV_STM32_CRYP' /boot/config-$(uname -r)

Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.

lsmod | grep -w stm32_cryp

Prints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.

Show whether Debian builds this, per release

Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.

  • bookwormMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt/amd64, arm64/arm64, arm64/cloud-arm64, arm64/rt/arm64, i386/686, i386/686-pae, i386/rt/686-pae, ppc64el/powerpc64le
  • trixieMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt/amd64, arm64/arm64, arm64/arm64-16k, arm64/cloud-arm64, arm64/rt/arm64, armel/rpi, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
  • forky, sidMnot built on amd64/amd64, amd64/cloud-amd64, amd64/rt-amd64, arm64/arm64, arm64/arm64-16k, arm64/cloud-arm64, arm64/rt-arm64, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
M
a module where it is built at all; some flavours do not build it
Build switches
CONFIG_ARCH_STM32, CONFIG_CRYPTO, CONFIG_CRYPTO_DEV_STM32_CRYP
Reads as
all on means the file is compiled; any one off means it is not.

From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages

Signals

Published
2024-10-09 (2 years ago)source
CVSS
7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:Hsource recompute it
Attack vector
network (AV:N)source
EPSS
0.47%, higher than 39.2% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
drivers/crypto

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
4.166.6.50d93a2f86b0a9
4.166.10.95d734665cd5d
4.166.1156ddb9aa3b32

Why the CNA scored it this way

Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source

AV:NAttack vector, network
The damaging consequence is reached through the IPsec ESP receive path — a remote peer's ESP packets drive `esp_input()`, whose completion callback `esp_input_done` → `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).
AC:LAttack complexity, low
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 — 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.
PR:NPrivileges required, none
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.
UI:NUser interaction, none
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.
S:UScope, unchanged
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.
C:NConfidentiality impact, none
The defect is an incorrect execution context for a completion callback, not a memory-safety error — there is no out-of-bounds read, no freed-object reuse, and no path by which attacker-readable data is exposed.
I:NIntegrity impact, none
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.
A:HAvailability impact, high
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`).