Skip to main content
Vulnerability Database/CVE-2024-46849

CVE-2024-46849: Linux Kernel Use-After-Free Vulnerability

CVE-2024-46849 is a use-after-free flaw in the Linux kernel ASoC meson axg-card driver affecting Debian Linux systems. This memory corruption issue occurs during buffer reallocation. This post explains its impact, technical details, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-46849 Overview

CVE-2024-46849 is a use-after-free vulnerability in the Linux kernel's ASoC (ALSA System on Chip) Amlogic Meson AXG sound card driver. The flaw resides in the axg_card_add_link() function within the snd_soc_meson_axg_sound_card module. The buffer card->dai_link is reallocated by meson_card_reallocate_links(), but the pad pointer was initialized before the reallocation, leaving it referencing freed memory. KASAN detected the slab-use-after-free during module probe. The issue is tracked as [CWE-416: Use After Free] and affects multiple stable Linux kernel branches and Debian Linux 11.

Critical Impact

A local user triggering the vulnerable code path on affected Amlogic Meson AXG platforms may cause kernel memory corruption, potentially leading to privilege escalation or denial of service.

Affected Products

  • Linux kernel (multiple stable branches up to 6.11-rc7)
  • Debian Linux 11 (Bullseye)
  • Systems running the snd_soc_meson_axg_sound_card kernel module on Amlogic Meson AXG SoCs

Discovery Timeline

  • 2024-09-27 - CVE-2024-46849 published to the National Vulnerability Database (NVD)
  • 2025-01 - Debian LTS advisory released addressing the vulnerability
  • 2025-03 - Follow-up Debian LTS advisory published
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-46849

Vulnerability Analysis

The vulnerability is a use-after-free condition in the Amlogic Meson AXG sound card driver (sound/soc/meson/axg-card.c). During driver initialization, axg_card_add_link() obtains a pointer to a pad structure referencing an entry inside card->dai_link. Subsequently, meson_card_reallocate_links() is invoked, which reallocates the underlying dai_link buffer. The previously captured pad pointer now references freed memory. Any dereference of this stale pointer accesses memory that has been returned to the slab allocator.

KASAN reported the issue as slab-use-after-free in axg_card_add_link+0x76c/0x9bc during a modprobe operation. The read occurs at an 8-byte boundary, consistent with a pointer dereference against the freed region. On vulnerable hardware, this condition is reached during normal probe of the audio stack.

Root Cause

The root cause is incorrect ordering of pointer initialization relative to a memory reallocation. The developer initialized pad from the DAI link array before calling the reallocation helper, which may free the original buffer and return a new pointer. The fix moves the pad initialization to occur after meson_card_reallocate_links() returns, ensuring the pointer references the current allocation.

Attack Vector

Exploitation requires local access with the ability to load or trigger initialization of the snd_soc_meson_axg_sound_card module on affected Amlogic Meson AXG hardware. The CVSS vector indicates a local attack with low privileges and no user interaction. A successful trigger produces kernel memory corruption. Depending on heap state, this can be leveraged for privilege escalation or cause kernel panic resulting in denial of service. No public proof-of-concept exploit is available, and the issue is not listed in the CISA Known Exploited Vulnerabilities catalog.

See the upstream fix in Kernel Commit 4f9a71435953 for the exact patch details.

Detection Methods for CVE-2024-46849

Indicators of Compromise

  • KASAN reports in kernel logs matching slab-use-after-free in axg_card_add_link
  • Unexpected kernel panics or oopses referencing snd_soc_meson_axg_sound_card or meson_card_probe
  • Unexplained module load failures or audio subsystem crashes on Amlogic Meson AXG platforms

Detection Strategies

  • Inventory kernel versions across Linux endpoints and flag hosts running vulnerable builds prior to the stable fix commits
  • Monitor dmesg and /var/log/kern.log for KASAN or BUG messages originating from the ASoC Meson driver
  • Use package management tooling (dpkg -l linux-image-*, apt list --installed) to identify Debian 11 systems lacking the LTS advisory updates

Monitoring Recommendations

  • Centralize kernel log collection and alert on new kernel oops or KASAN entries involving sound subsystem symbols
  • Track successful and failed finit_module and init_module syscalls on embedded Amlogic devices
  • Correlate module load events with subsequent kernel instability to surface exploitation attempts

How to Mitigate CVE-2024-46849

Immediate Actions Required

Patch Information

The upstream fix reorders the pad pointer initialization to occur after meson_card_reallocate_links(). The patch is available across multiple stable branches via the following commits: 4f9a71435953, 5a2cc2bb8139, 7d318166bf55, a33145f494e6, e1a199ec3161, e43364f578cd, and fb0530025d50.

Workarounds

  • On systems that do not require Amlogic Meson AXG audio support, blacklist the snd_soc_meson_axg_sound_card module to prevent its load
  • Restrict module loading capabilities by removing CAP_SYS_MODULE from non-administrative users and enabling kernel.modules_disabled=1 where feasible
  • Enforce signed-module policies to ensure only vetted kernel modules can be loaded on production systems
bash
# Blacklist the vulnerable module until the kernel is patched
echo "blacklist snd_soc_meson_axg_sound_card" | sudo tee /etc/modprobe.d/cve-2024-46849.conf
sudo depmod -a

# Verify the running kernel version after upgrade
uname -r
dpkg -l | grep linux-image

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.