Data Corruption Risk in Linux Kernel due to SMB Write Size Misconfiguration
Summary
DEBIAN-CVE-2024-26692: In the Linux kernel, the following vulnerability has been resolved: smb: Fix regression in writes when non-standard maximum write size negotiated The conversion to netfs in the 6.3 kernel caused a regression when maximum... Affects linux versions < 6.7.7-1. Fixed in 6.7.7-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 the Linux operating system, responsible for managing hardware and system resources. It provides essential services for all other parts of the system, including process management, memory management, and device control. The kernel is highly modular and supports a wide range of hardware architectures. This vulnerability specifically affects the SMB (Server Message Block) protocol implementation in the kernel, which is used for file sharing and network communication. The issue arises from a regression introduced in version 6.3, where non-standard maximum write sizes can lead to data corruption during large sequential writes.
Vulnerability Detail
In the Linux kernel, a vulnerability has been identified related to the SMB protocol where a regression in write operations occurs when the maximum write size negotiated is not a multiple of 4096. This can lead to data corruption as the netfs code may skip the end of the final page during large writes. The issue stems from a conversion to netfs in the 6.3 kernel, which does not properly handle non-standard maximum write sizes. Users who set a custom write size that is not a multiple of 4096 may experience data loss or corruption.
How To Fix
Minimum fixed version
6.7.7-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 should avoid setting the mount parameter 'wsize' to values that are not multiples of 4096. If a non-standard value is necessary, consider rounding down to the nearest multiple of 4096 to prevent potential data corruption.
Conclusion
The identified vulnerability in the Linux kernel poses a significant risk of data corruption due to improper handling of SMB write sizes. Users are encouraged to update their systems to the latest patched version to mitigate this risk. Until an update can be applied, following the recommended workarounds can help prevent potential data loss.
See every vulnerability recorded for linux →
FAQ
The vulnerability can lead to data corruption during file writes when using SMB with non-standard maximum write sizes.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
The vulnerability affects Linux kernel versions prior to 6.7.7-1.
Yes, updating to the patched version 6.7.7-1 or later resolves the vulnerability.
If immediate updates are not possible, ensure to avoid using non-standard write sizes in your SMB configurations as a temporary measure.
References
Related vulnerabilities
Recent vulnerabilities recorded for linux.