CVE-2025-38709: loop: Avoid updating block size under exclusive owner
In the Linux kernel, the following vulnerability has been resolved:
loop: Avoid updating block size under exclusive owner
Syzbot came up with a reproducer where a loop device block size is changed underneath a mounted filesystem. This causes a mismatch between the block device block size and the block size stored in the superblock causing confusion in various places such as fs/buffer.c. The particular issue triggered by syzbot was a warning in getblkslow() due to requested buffer size not matching block device block size.
Fix the problem by getting exclusive hold of the loop device to change its block size. This fails if somebody (such as filesystem) has already an exclusive ownership of the block device and thus prevents modifying the loop device under some exclusive owner which doesn't expect it.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.104.2-1 - Compensating control
Ensure the loop device is not exclusively held by another component (e.g., a mounted filesystem) before changing the loop device block size; otherwise, the block size update may be blocked or cause confusion in buffer/superblock handling.
Event History
Frequently Asked Questions
What is the severity of CVE-2025-38709?
CVE-2025-38709 has been classified as a moderate severity vulnerability due to its potential impact on systems using loop devices.
How do I fix CVE-2025-38709?
To fix CVE-2025-38709, you should update your Linux kernel to the latest stable version that addresses this vulnerability.
What systems are affected by CVE-2025-38709?
CVE-2025-38709 affects systems running the Linux kernel that utilize loop devices for mounting filesystems.
What is the nature of the vulnerability in CVE-2025-38709?
CVE-2025-38709 involves a flaw in handling block sizes of loop devices, which can lead to inconsistencies when filesystems are mounted.
Is there any known exploit for CVE-2025-38709?
As of now, there are no public exploits specifically targeting CVE-2025-38709, but it is recommended to address the vulnerability promptly.