Выявлена и исправлена критическая уязвимость в реализации NFS

Уязвимость заключается в возможности удалённого атакующего получить доступ к директориям за пределами экспортируемой по NFS, через вызов READDIRPLUS на .. корневого экспортируемого каталога.

Уязвимость исправлена в вышедшем 23 января ядре 5.10.10, а так же во всех остальных поддерживаемых версиях ядер, обновлённых в этот день:

commit fdcaa4af5e70e2d984c9620a09e9dade067f2620
Author: J. Bruce Fields <[email protected]>
Date: Mon Jan 11 16:01:29 2021 -0500

nfsd4: readdirplus shouldn’t return parent of export

commit 51b2ee7d006a736a9126e8111d1f24e4fd0afaa6 upstream.

If you export a subdirectory of a filesystem, a READDIRPLUS on the root
of that export will return the filehandle of the parent with the ".."
entry.

The filehandle is optional, so let’s just not return the filehandle for
".." if we’re at the root of an export.

Note that once the client learns one filehandle outside of the export,
they can trivially access the rest of the export using further lookups.

However, it is also not very difficult to guess filehandles outside of
the export. So exporting a subdirectory of a filesystem should
considered equivalent to providing access to the entire filesystem. To
avoid confusion, we recommend only exporting entire filesystems.

Reported-by: Youjipeng <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Cc: [email protected]
Signed-off-by: Chuck Lever <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Источник: linux.org.ru