In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the…
mitre·CWE-362·Published 2018-06-12
In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash.
In net/socket.c in the Linux kernel through 4.17.1, there is a race condition between fchownat and close in cases where they target the same socket file descriptor, related to the sock_close and sockfs_setattr functions. fchownat does not increment the file descriptor reference count, which allows close to set the socket to NULL during fchownat's execution, leading to a NULL pointer dereference and system crash.
En net/socket.c en el kernel de Linux hasta la versión 4.17.1, hay una condición de carrera entre fchownat y close en los casos en los que apuntan al mismo descriptor de archivo socket. Esto está relacionado con las funciones sock_close y sockfs_setattr. fchownat no incrementa el conteo de referencia del descriptor de archivos, lo que permite que close establezca el socket como NULL durante la ejecución de fchownat lo que conduce a una desreferencia de puntero NULL y a un cierre inesperado del sistema.
| Version | Type | Source | Base | Exp | Impact | Vector |
|---|---|---|---|---|---|---|
| 2.0 | Primary | NVD | 7.1 | 8.6 | 6.9 | AV:N/AC:M/Au:N/C:N/I:N/A:C |
| 3.0 | Primary | NVD | 5.9 | 2.2 | 3.6 | CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |