ВыявлСна ΠΈ исправлСна критичСская ΡƒΡΠ·Π²ΠΈΠΌΠΎΡΡ‚ΡŒ Π² Ρ€Π΅Π°Π»ΠΈΠ·Π°Ρ†ΠΈΠΈ 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