IM
IronMonkey Threat Research

CVE-2022-48827 HIGH

Published: 2024-07-16 | Last Modified: 2026-08-04 | Status: Modified

Description

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.

Additional Descriptions (1)

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.

CVSS Metrics

Base Score: 7.1 (HIGH)

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H

Attack VectorLOCAL
Attack ComplexityLOW
Privileges RequiredLOW
User InteractionNONE
ScopeUNCHANGED
Confidentiality ImpactHIGH
Integrity ImpactNONE
Availability ImpactHIGH

Source: [email protected]

Type: Primary

Exploitability Score: 1.8

Impact Score: 5.2

Weaknesses

Source Type Description
[email protected] Primary
en CWE-125

Affected Products

Vendor Product Version Update Type
linux linux_kernel * <built-in method update of dict object at 0x7fd31b63d400> Operating System
linux linux_kernel * <built-in method update of dict object at 0x7fd36059f480> Operating System
linux linux_kernel * <built-in method update of dict object at 0x7fd3845f4980> Operating System
linux linux_kernel 5.17 <built-in method update of dict object at 0x7fd340829a00> Operating System
linux linux_kernel 5.17 <built-in method update of dict object at 0x7fd31b63dc00> Operating System
linux linux_kernel 5.17 <built-in method update of dict object at 0x7fd31b63d680> Operating System

Affected Configurations

Operator: OR

Vulnerable CPE
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*
Yes cpe:2.3:o:linux:linux_kernel:5.17:rc3:*:*:*:*:*:*

References