NFS2ROOT — távoli kihasználásra alkalmas sérülékenység az NFS szerverben, amely a Linux kernelbe van beépítve

A NFS server (nfsd), which is part of the Linux kernel, has a vulnerability (CVE-2026-99362) that allows remote code execution with kernel privileges without authentication. The vulnerability is codenamed NFS2ROOT and has a severity level of 9.8 out of 10 (CVSS). Attacks are possible on servers utilizing the nfsd kernel module to process NFSv4.1/4.2 requests and accepting external network connections on TCP port 2049. Vulnerable configurations can be found in network-attached storage (NAS), file szervereken, assembly infrastructures, and Kubernetes storage nodes. Researchers who discovered the issue were able to prepare a working exploit that allows remote root access to szerveren, but the exploit has not yet been published.

The vulnerability can be exploited by establishing a single TCP connection with szerverrel. The vulnerability is caused by a buffer overflow in the session slot caching code within the implementations of NFSv4.1 and 4.2. The cache retains the last responses a szerver for retrieval in case of a repeated request. The size of the cache is determined by the NFS client. When the client transmits 0 in the cache size field, the nfsd4_sequence() function on the server reduces the response buffer size to zero, but then attempts to copy the full response into a zero-sized buffer. As a result, 61 bytes of data overlap the kernel structures following the buffer, of which 40 bytes (headers and tag) are completely controlled by the attacker.

In the prepared exploit, the overflow is used to corrupt the control structures of the adjacent slot, resulting in a leak of 3.8 KB of data from the kernel memory during the processing of the next request and determining the memory layout in the kernel to bypass address space randomization. Then, a substitution is made in the following pointer structure to initiate the release of the selected object in the kernel memory. After that, the freed memory is replaced with a fake callback handler, composed of the names of NFS clients, which is activated when the TCP connection with the NFS server is terminated.

A probléma a Linux 3.16-os kernél kezdődött (2014) és a 6.12.117, 6.18.61, 7.3.2 és 7.4-rc1 verziókban lett kijavítva. A sebezhetőségek a disztribúciókban az alábbi oldalakon ellenőrizhetők: Debian, Ubuntu, SUSE/openSUSE, RHEL, Gentoo, Arch, Fedora. A védelem alternatív megoldásaként blokkolható a TCP 2049-es porthoz való hozzáférés a tűzfalon, vagy letilthatók a sebezhető protokoll verziók a /etc/nfs.conf fájlban: [nfsd] vers4.1=n vers4.2=n

Az nfsd modul betöltöttségének ellenőrzésére használható a „lsmod | grep -w nfsd” parancs, a NFS által kezelt protokollverziók meghatározásához pedig a „cat /proc/fs/nfsd/versions” parancs. A támadás közvetett jelei közé tartozhat, ha a naplókban figyelmeztetések találhatók az nfsd4_check_resp_size-ra vonatkozóan, valamint oops hibák, amelyek „nfsd4_*”, „svc_*” vagy „call_usermodehelper*” struktúrákra utalnak.

Forrás: opennet.ru

Megbízható hosting vásárlása weboldalak számára, DDoS védelemmel, VPS VDS szerverek. 🔥 Megbízható webtárhely vásárlása DDoS védelemmel, VPS VDS szerverek | ProHoster