CVE-2022-48827·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: NFSD: Fix the behavior of READ near OFFSET_MAX Dan Aloni reports: > Due to commit 8cfb9015280d ("NFS: Always provide aligned buffers to > the RPC read layers") on the client, a read of 0xfff is aligned up > to server rsize of 0x1000. > > As a result, in a test where the server has a file of size > 0x7fffffffffffffff, and the client tries to read from the offset > 0x7ffffffffffff000, the read causes loff_t overflow in the server > and it returns an NFS code of EINVAL to the client. The client as > a result indefinitely retries the request. The Linux NFS client does not handle NFS?ERR_INVAL, even though all NFS specifications permit servers to return that status code for a READ. Instead of NFS?ERR_INVAL, have out-of-range READ requests succeed and return a short result. Set the EOF flag in the result to prevent the client from retrying the READ request. This behavior appears to be consistent with Solaris NFS servers. Note that NFSv3 and NFSv4 use u64 offset values on the wire. These must be converted to loff_t internally before use -- an implicit type cast is not adequate for this purpose. Otherwise VFS checks against sb->s_maxbytes do not work properly.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.16.10
- Published
- 2024-07-16
Affected versions
From: 5.16
Until: 5.16.10
Fixed in: 5.16.10
How to fix this CVE
Update your Linux kernel to version 5.16.10 or later to resolve an NFS READ operation vulnerability that can cause integer overflow when accessing files near the maximum offset limit. This fix ensures that out-of-range READ requests return appropriate responses with EOF flags instead of causing server errors and client retry loops. Apply the patch immediately if you are running NFSD with NFS clients that perform large read operations.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Check your current kernel version: uname -r
- Verify if you are running a vulnerable version (5.16 to 5.16.9): if your kernel version falls in this range, your system is vulnerable
- Confirm NFSD is enabled: systemctl status nfs-server or ps aux | grep nfsd
- Review kernel logs for NFS READ errors near large offsets: dmesg | grep -i 'nfs.*read' or journalctl -u nfs-server | grep -i 'overflow'
- Verify the patch is applied by checking kernel release: uname -r should show 5.16.10 or later
FAQ
What is CVE-2022-48827?
This vulnerability affects the Linux kernel's NFS server implementation, specifically in how it handles READ operations targeting file offsets near the maximum representable value. An integer overflow condition can cause the server to return EINVAL errors instead of handling the request gracefully, triggering infinite client retries.
Is CVE-2022-48827 being actively exploited?
No, this vulnerability is not listed on the CISA Known Exploited Vulnerabilities catalog and has no publicly available exploits. It requires specific NFS client and server configurations to trigger.
What versions of Kernel are affected by CVE-2022-48827?
Linux kernel versions 5.16 through 5.16.9 are affected. Version 5.16.10 and all later versions include the fix.
How do I check if my server is vulnerable to CVE-2022-48827?
Run 'uname -r' to check your kernel version. If it shows 5.16.0 through 5.16.9, your system is vulnerable. Additionally, verify NFSD is running with 'systemctl status nfs-server'.
Does Defensia detect CVE-2022-48827?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2022-48827 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960
- https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9
- https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b
- https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0
- https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-48827. Free for 1 server.
Get started free