CVE-2022-48827

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*

History

25 Sep 2025, 19:32

Type Values Removed Values Added
CWE CWE-125
First Time Linux
Linux linux Kernel
CPE cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.1
References () https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960 - () https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960 - Patch
References () https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9 - () https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9 - Patch
References () https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b - () https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b - Patch
References () https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0 - () https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0 - Patch

21 Nov 2024, 07:34

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960 - () https://git.kernel.org/stable/c/0cb4d23ae08c48f6bf3c29a8e5c4a74b8388b960 -
References () https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9 - () https://git.kernel.org/stable/c/1726a39b0879acfb490b22dca643f26f4f907da9 -
References () https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b - () https://git.kernel.org/stable/c/44502aca8e02ab32d6b0eb52e006a5ec9402719b -
References () https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0 - () https://git.kernel.org/stable/c/c6eff5c4277146a78b4fb8c9b668dd64542c41b0 -
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: NFSD: corrige el comportamiento de READ cerca de OFFSET_MAX Dan Aloni informa: > Debido a El commit 8cfb9015280d ("NFS: siempre proporcione buffers alineados a > las capas de lectura RPC") en el cliente, una lectura de 0xfff está alineada con el tamaño del servidor de 0x1000. > > Como resultado, en una prueba donde el servidor tiene un archivo de tamaño > 0x7ffffffffffffffff, y el cliente intenta leer desde el desplazamiento > 0x7ffffffffffffff000, la lectura causa que loff_t se desborde en el servidor > y devuelve un código NFS de EINVAL a el cliente. Como resultado, el cliente reintenta indefinidamente la solicitud. El cliente NFS de Linux no maneja NFS?ERR_INVAL, aunque todas las especificaciones de NFS permiten a los servidores devolver ese código de estado para una READ. En lugar de NFS?ERR_INVAL, haga que las solicitudes READ fuera de rango se realicen correctamente y devuelvan un resultado breve. Establezca el indicador EOF en el resultado para evitar que el cliente vuelva a intentar la solicitud READ. Este comportamiento parece ser coherente con los servidores Solaris NFS. Tenga en cuenta que NFSv3 y NFSv4 utilizan valores de compensación u64 en el cable. Estos deben convertirse a loff_t internamente antes de su uso; una conversión de tipo implícita no es adecuada para este propósito. De lo contrario, las comprobaciones de VFS con sb->s_maxbytes no funcionan correctamente.

16 Jul 2024, 12:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-07-16 12:15

Updated : 2025-09-25 19:32


NVD link : CVE-2022-48827

Mitre link : CVE-2022-48827

CVE.ORG link : CVE-2022-48827


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-125

Out-of-bounds Read