Executive brief
A vulnerability in the Linux kernel's Network File System (NFS) server component could allow a user to cause a system hang or potentially access unauthorized data. When a client attempts to read data near the maximum possible file size, the server may experience an internal overflow error. This causes the client to enter an infinite loop of retrying the request, which can disrupt operations and impact system availability.
Technical details
An integer overflow vulnerability exists in the Linux kernel's NFSD implementation (NFSv3 and NFSv4) when processing READ requests with offsets near OFFSET_MAX. The root cause is an inadequate conversion of u64 wire offset values to internal loff_t types, which bypasses VFS checks against sb->s_maxbytes. When a client sends a read request that, when aligned, exceeds the maximum offset, the server returns EINVAL. Because the Linux NFS client does not handle this error code for READ operations, it enters an infinite retry loop. An attacker could exploit this to cause a denial-of-service (DoS) or potentially trigger an out-of-bounds read (CWE-125). Patches have been released for various stable kernel branches to ensure offsets are properly capped and return short results with an EOF flag instead of an error.
Affected products
- Linux Linux Kernel versions up to 5.10.220, 5.11 to 5.15.24, 5.16 to 5.16.10
Timeline
- 2022-02-04: patched: Initial fix authored by Chuck Lever
- 2024-07-16: disclosed: CVE-2022-48827 published
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://cert-portal.siemens.com/productcert/html/ssa-265688.html
- https://cert-portal.siemens.com/productcert/html/ssa-355557.html