Blame SOURCES/1624841-mpo-7.9.0-exports.5.patch

035aa2
From ca1eb318807f5b81279c9ca97a62cccf7a5ea4f2 Mon Sep 17 00:00:00 2001
035aa2
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
035aa2
Date: Mon, 20 Apr 2020 10:49:46 +0200
035aa2
Subject: [PATCH] exports.5: warn about subdirectory exports
035aa2
035aa2
---
035aa2
 nfs-utils/man5/exports.5 | 27 +++++++++++++++++++++++++++
035aa2
 1 file changed, 27 insertions(+)
035aa2
035aa2
diff --git a/nfs-utils/man5/exports.5 b/nfs-utils/man5/exports.5
035aa2
index 4f95f3a..2ce46d9 100644
035aa2
--- a/nfs-utils/man5/exports.5
035aa2
+++ b/nfs-utils/man5/exports.5
035aa2
@@ -492,6 +492,33 @@ export entry for
035aa2
 .B /home/joe
035aa2
 in the example section below, which maps all requests to uid 150 (which
035aa2
 is supposedly that of user joe).
035aa2
+
035aa2
+.SS Subdirectory Exports
035aa2
+
035aa2
+Normally you should only export only the root of a filesystem.  The NFS
035aa2
+server will also allow you to export a subdirectory of a filesystem,
035aa2
+however, this has drawbacks:
035aa2
+
035aa2
+First, it may be possible for a malicious user to access files on the
035aa2
+filesystem outside of the exported subdirectory, by guessing filehandles
035aa2
+for those other files.  The only way to prevent this is by using the
035aa2
+.IR no_subtree_check
035aa2
+option, which can cause other problems.
035aa2
+
035aa2
+Second, export options may not be enforced in the way that you would
035aa2
+expect.  For example, the
035aa2
+.IR security_label
035aa2
+option will not work on subdirectory exports, and if nested subdirectory
035aa2
+exports change the
035aa2
+.IR security_label
035aa2
+or
035aa2
+.IR sec=
035aa2
+options, NFSv4 clients will normally see only the options on the parent
035aa2
+export.  Also, where security options differ, a malicious client may use
035aa2
+filehandle-guessing attacks to access the files from one subdirectory
035aa2
+using the options from another.
035aa2
+
035aa2
+
035aa2
 .SS Extra Export Tables
035aa2
 After reading 
035aa2
 .I /etc/exports 
035aa2
-- 
035aa2
2.26.0
035aa2