Lucene search

K
cveLinuxCVE-2024-42274
HistoryAug 17, 2024 - 9:15 a.m.

CVE-2024-42274

2024-08-1709:15:08
Linux
web.nvd.nist.gov
29
linux kernel
rme fireface 800
deadlock competition
system freeze
alsa operation
vulnerability
deadlock
ab/ba
firewire-lib
process context

AI Score

6.5

Confidence

High

EPSS

0

Percentile

16.3%

In the Linux kernel, the following vulnerability has been resolved:

Revert “ALSA: firewire-lib: operate for period elapse event in process context”

Commit 7ba5ca32fe6e (“ALSA: firewire-lib: operate for period elapse event
in process context”) removed the process context workqueue from
amdtp_domain_stream_pcm_pointer() and update_pcm_pointers() to remove
its overhead.

With RME Fireface 800, this lead to a regression since
Kernels 5.14.0, causing an AB/BA deadlock competition for the
substream lock with eventual system freeze under ALSA operation:

thread 0:
* (lock A) acquire substream lock by
snd_pcm_stream_lock_irq() in
snd_pcm_status64()
* (lock B) wait for tasklet to finish by calling
tasklet_unlock_spin_wait() in
tasklet_disable_in_atomic() in
ohci_flush_iso_completions() of ohci.c

thread 1:
* (lock B) enter tasklet
* (lock A) attempt to acquire substream lock,
waiting for it to be released:
snd_pcm_stream_lock_irqsave() in
snd_pcm_period_elapsed() in
update_pcm_pointers() in
process_ctx_payloads() in
process_rx_packets() of amdtp-stream.c

? tasklet_unlock_spin_wait
</NMI>
<TASK>
ohci_flush_iso_completions firewire_ohci
amdtp_domain_stream_pcm_pointer snd_firewire_lib
snd_pcm_update_hw_ptr0 snd_pcm
snd_pcm_status64 snd_pcm

? native_queued_spin_lock_slowpath
</NMI>
<IRQ>
_raw_spin_lock_irqsave
snd_pcm_period_elapsed snd_pcm
process_rx_packets snd_firewire_lib
irq_target_callback snd_firewire_lib
handle_it_packet firewire_ohci
context_tasklet firewire_ohci

Restore the process context work queue to prevent deadlock
AB/BA deadlock competition for ALSA substream lock of
snd_pcm_stream_lock_irq() in snd_pcm_status64()
and snd_pcm_stream_lock_irqsave() in snd_pcm_period_elapsed().

revert commit 7ba5ca32fe6e (“ALSA: firewire-lib: operate for period
elapse event in process context”)

Replace inline description to prevent future deadlock.

Affected configurations

Vulners
Node
linuxlinux_kernelRange5.145.15.165
OR
linuxlinux_kernelRange5.16.06.1.104
OR
linuxlinux_kernelRange6.2.06.6.45
OR
linuxlinux_kernelRange6.7.06.10.4
OR
linuxlinux_kernelRange6.11.0
VendorProductVersionCPE
linuxlinux_kernel*cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

CNA Affected

[
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "unaffected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "sound/firewire/amdtp-stream.c"
    ],
    "versions": [
      {
        "version": "7ba5ca32fe6e",
        "lessThan": "7c07220cf634",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "7ba5ca32fe6e",
        "lessThan": "b239a37d68e8",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "7ba5ca32fe6e",
        "lessThan": "f5043e69aeb2",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "7ba5ca32fe6e",
        "lessThan": "36c255db5a25",
        "status": "affected",
        "versionType": "git"
      },
      {
        "version": "7ba5ca32fe6e",
        "lessThan": "3dab73ab925a",
        "status": "affected",
        "versionType": "git"
      }
    ]
  },
  {
    "product": "Linux",
    "vendor": "Linux",
    "defaultStatus": "affected",
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "programFiles": [
      "sound/firewire/amdtp-stream.c"
    ],
    "versions": [
      {
        "version": "5.14",
        "status": "affected"
      },
      {
        "version": "0",
        "lessThan": "5.14",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "5.15.165",
        "lessThanOrEqual": "5.15.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.1.104",
        "lessThanOrEqual": "6.1.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.6.45",
        "lessThanOrEqual": "6.6.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.10.4",
        "lessThanOrEqual": "6.10.*",
        "status": "unaffected",
        "versionType": "custom"
      },
      {
        "version": "6.11",
        "lessThanOrEqual": "*",
        "status": "unaffected",
        "versionType": "original_commit_for_fix"
      }
    ]
  }
]

AI Score

6.5

Confidence

High

EPSS

0

Percentile

16.3%