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-2026-98146 Overview
CVE-2026-98146 is a Linux kernel vulnerability in the accel/amdxdna driver that can trigger a kernel panic from unprivileged userspace. The struct amdxdna_cmd_chain contains a flexible array annotated with __counted_by(command_count). Because the structure resides in shared AMDXDNA_BO_SHARE memory, userspace can modify command_count concurrently with kernel access. Setting command_count to zero causes the compiler-generated bounds check from __counted_by to fail, which triggers a kernel panic. The upstream fix removes the __counted_by annotation so the kernel no longer relies on a userspace-controlled value for bounds enforcement.
Critical Impact
Local users with access to the AMD XDNA accelerator device can crash the kernel by racing modifications to shared memory, resulting in denial of service on affected Linux systems.
Affected Products
- Linux kernel versions containing the accel/amdxdna driver with the __counted_by annotation on struct amdxdna_cmd_chain
- Systems with AMD XDNA (Ryzen AI NPU) hardware exposing the accelerator device to userspace
- Distributions shipping affected stable kernel branches prior to the fix commits
Discovery Timeline
- 2026-09-25 - CVE-2026-98146 published to the National Vulnerability Database
- 2026-09-30 - Last updated in NVD database
Technical Details for CVE-2026-98146
Vulnerability Analysis
The __counted_by attribute informs the compiler that a flexible array member is bounded by a sibling struct field. The kernel uses this to generate runtime bounds checks via FORTIFY_SOURCE and related hardening infrastructure. These checks assume the counter field is stable and trustworthy for the lifetime of the access.
In struct amdxdna_cmd_chain, the command_count field is annotated as the counter. However, instances of this structure live inside buffer objects allocated with the AMDXDNA_BO_SHARE flag, which maps the memory into userspace. A local attacker holding a handle to that buffer can rewrite command_count at any time, including while the kernel iterates the flexible array.
When the kernel reads command_count as zero during a bounds check for any element access, the fortified accessor treats the access as out-of-bounds. This triggers a BUG() or warn-and-panic path, depending on configuration, bringing down the system.
Root Cause
The root cause is misuse of a hardening annotation on a shared memory region. __counted_by is designed for kernel-owned structures where the counter cannot be mutated out from under the accessor. Placing the annotation on data stored in AMDXDNA_BO_SHARE memory inverts the trust model, turning a defense-in-depth check into a userspace-triggerable denial of service primitive. This is a kernel vulnerability [CWE-367] in the time-of-check to time-of-use category combined with improper validation of untrusted input.
Attack Vector
Exploitation requires local access and the ability to open the AMD XDNA accelerator device node. The attacker allocates a shared buffer object, writes a crafted amdxdna_cmd_chain with a non-zero command_count, submits the command chain, and then races to overwrite command_count with zero before the kernel completes its bounds-checked iteration. A successful race crashes the kernel. See the upstream commits 52f3e086760a, 93fa3e925b15, and b3709d354545 for the fix.
Detection Methods for CVE-2026-98146
Indicators of Compromise
- Unexpected kernel panics or BUG: messages referencing amdxdna_cmd_chain or fortified array accessors in dmesg and crash dumps
- Repeated process crashes or system reboots on hosts with AMD XDNA NPU hardware shortly after unprivileged workloads access /dev/accel/accel*
- Core dumps or kernel oops reports originating from the accel/amdxdna driver
Detection Strategies
- Audit kernel versions on hosts with AMD Ryzen AI hardware and flag systems missing the fix commits listed in the upstream references
- Correlate kernel crash telemetry with user activity on the AMD XDNA device node to identify suspicious access patterns
- Monitor for processes that open the accelerator device without a legitimate AI/ML workload justification
Monitoring Recommendations
- Forward kernel ring buffer and kdump artifacts to a central logging platform for pattern analysis
- Alert on any BUG or WARN entries that reference amdxdna driver symbols
- Track user and container access to /dev/accel/* nodes and compare against baseline workload inventories
How to Mitigate CVE-2026-98146
Immediate Actions Required
- Update affected systems to a Linux kernel release containing the upstream fix that removes __counted_by from struct amdxdna_cmd_chain
- Restrict access to the AMD XDNA accelerator device node to trusted users and workloads via filesystem permissions or device cgroups
- On systems that do not require the NPU, blacklist the amdxdna kernel module until a patched kernel is deployed
Patch Information
The fix is available in upstream stable commits 52f3e086760a, 93fa3e925b15, and b3709d354545. The patch removes the __counted_by(command_count) annotation so the kernel no longer uses a userspace-mutable counter for bounds enforcement. Distribution vendors are expected to backport the change to supported stable branches.
Workarounds
- Unload the amdxdna module with modprobe -r amdxdna on systems that do not use AMD NPU acceleration
- Apply device-node access controls so only vetted service accounts can open the accelerator interface
- Enforce workload isolation through user namespaces or seccomp profiles that block access to /dev/accel/*
# Prevent the vulnerable module from loading until the kernel is patched
echo 'blacklist amdxdna' | sudo tee /etc/modprobe.d/blacklist-amdxdna.conf
sudo rmmod amdxdna 2>/dev/null || true
# Restrict access to accelerator device nodes to a trusted group
sudo chgrp accel /dev/accel/accel0
sudo chmod 0660 /dev/accel/accel0
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

