Increased DMA Alignment Requirement in Linux Kernel for LoongArch Devices
Summary
CVE-2025-22049: In the Linux kernel, the following vulnerability has been resolved: LoongArch: Increase ARCH_DMA_MINALIGN up to 16 ARCH_DMA_MINALIGN is 1 by default, but some LoongArch-specific devices (such as APBDMA) require 16 bytes... Affects linux versions < 6.1.135-1. Fixed in 6.1.135-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Linux kernel is the core component of many operating systems, providing essential services for hardware and software interaction. It supports a wide range of architectures, including LoongArch, which is designed for specific hardware configurations. This vulnerability arises from the need for proper memory alignment in DMA operations, particularly for LoongArch-specific devices that require 16-byte alignment for safe data handling.
Vulnerability Detail
In the Linux kernel, the ARCH_DMA_MINALIGN parameter is set to 1 by default, which can lead to unsafe memory allocations for Direct Memory Access (DMA) operations on certain LoongArch devices. When the data buffer length is insufficient, it can cause hardware errors during cacheline writes, potentially leading to data corruption or system instability. The vulnerability highlights the importance of aligning memory buffers correctly to prevent such issues.
How To Fix
Minimum fixed version
6.1.135-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade linux
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users can manually allocate larger memory buffers for DMA operations to ensure proper alignment. This can be done by modifying the code to allocate memory with a size that is a multiple of 16 bytes, ensuring that the buffer meets the alignment requirements.
Conclusion
The vulnerability CVE-2025-22049 in the Linux kernel highlights the critical need for proper memory alignment in DMA operations for LoongArch devices. Users are encouraged to update their systems to the latest kernel version to mitigate risks associated with this issue. Additionally, utilizing tools like Vulert can help monitor and alert for vulnerabilities in real-time.
See every vulnerability recorded for linux →
FAQ
ARCH_DMA_MINALIGN is a kernel parameter that defines the minimum alignment for DMA memory allocations. It is crucial for ensuring that data is correctly handled by hardware devices.
Failing to address this vulnerability can lead to data corruption, system crashes, and unpredictable behavior in applications that rely on DMA operations.
You can use Vulert, which monitors open-source vulnerabilities in your software. By uploading your manifest file like package-lock.json, you can check for vulnerabilities without needing to install any software.
Yes, the vulnerability has been addressed in the latest versions of the Linux kernel. Users should ensure they are running an updated version that includes the fix.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Related vulnerabilities
Recent vulnerabilities recorded for linux.