Skip to contentSkip to conversation

Let unprivileged users list mounted filesystems

PATCH New Guido Trentalancia 2 participants 2 messages Oct 29, 2016 – Oct 30, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Let unprivileged users list mounted filesystems

Let unprivileged users list filesystems mounted on mount points such as /mnt (cdrom, FAT, NTFS and so on).

This makes a great difference to the usability and effectiveness of graphical filesystem browsers such as Gnome Nautilus and currently comes at no security penalty because mounted filesystems can be listed with programs such as the "df" program from GNU coreutils or by simply reading /proc/mounts.

---
 policy/modules/system/userdomain.if |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
policy/modules/system/userdomain.if +2 -2
diff -pruN refpolicy-git-29102016-orig/policy/modules/system/userdomain.if refpolicy-git-29102016/policy/modules/system/userdomain.if
@@ -530,8 +530,8 @@ template(`userdom_common_user_template',
 
 	files_exec_etc_files($1_t)
 	files_search_locks($1_t)
-	# Check to see if cdrom is mounted
-	files_search_mnt($1_t)
+	# List mounted filesystems (cdrom, FAT, NTFS and so on)
+	files_list_mnt($1_t)
 	# cjp: perhaps should cut back on file reads:
 	files_read_var_files($1_t)
 	files_read_var_symlinks($1_t)
#1 lore raw

PATCH 1/1 Let unprivileged users list mounted filesystems

Quoted 18 lines · Guido Trentalancia via refpolicy

Let unprivileged users list filesystems mounted on mount points such as /mnt (cdrom, FAT, NTFS and so on).

This makes a great difference to the usability and effectiveness of graphical filesystem browsers such as Gnome Nautilus and currently comes at no security penalty because mounted filesystems can be listed with programs such as the "df" program from GNU coreutils or by simply reading /proc/mounts.

---
 policy/modules/system/userdomain.if |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -pruN refpolicy-git-29102016-orig/policy/modules/system/userdomain.if refpolicy-git-29102016/policy/modules/system/userdomain.if

policy/modules/system/userdomain.if template(`userdom_common_user_template', · line 537

Quoted 10 lines
policy/modules/system/userdomain.if +2 -2
@@ -530,8 +530,8 @@ template(`userdom_common_user_template',
 
 	files_exec_etc_files($1_t)
 	files_search_locks($1_t)
-	# Check to see if cdrom is mounted
-	files_search_mnt($1_t)
+	# List mounted filesystems (cdrom, FAT, NTFS and so on)
+	files_list_mnt($1_t)
 	# cjp: perhaps should cut back on file reads:
 	files_read_var_files($1_t)
 	files_read_var_symlinks($1_t)

Merged.

Signature · 1 line
Chris PeBenito