Bug 188753 - [jail] mount devfs ruleset ignored
Summary: [jail] mount devfs ruleset ignored
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-jail (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-18 11:20 UTC by poboxer
Modified: 2018-05-29 14:47 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description poboxer 2014-04-18 11:20:00 UTC
Problem discovered while using jails on FreeBSD 10.

It appears that ruleset is ignored while mounting exposing most of
host's /dev/.

[root@host]# tail -n4 /etc/defaults/devfs.rules 
# Devices usually found in a jail.
#
[devfsrules_jail=4]
add include $devfsrules_hide_all

[root@host]# mount -t devfs -o ruleset=4 devfs /mnt/test

[root@host]#  ls -l /mnt/test | wc -l
      95

How-To-Repeat: # mount devfs using ruleset 4 from /etc/defaults/devfs.rules

mount -t devfs -o ruleset=4 devfs /mnt/test

# check

ls -l /mnt/test
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-04-20 01:24:47 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-jail

Over to maintainer(s).
Comment 2 Herbert J. Skuhra 2014-04-20 12:42:49 UTC
Hi,

you can add the following line to your /etc/rc.conf

devfs_load_rulesets="YES"

and run '/etc/rc.d/devfs restart'.

Or check /etc/defaults/rc.conf:

devfs_rulesets="/etc/defaults/devfs.rules /etc/devfs.rules" # Files containing
                                                            # devfs(8) rules.
devfs_system_ruleset="" # The name (NOT number) of a ruleset to apply to /dev
devfs_set_rulesets=""   # A list of /mount/dev=ruleset_name settings to
                        # apply (must be mounted already, i.e. fstab(5))
devfs_load_rulesets="NO"        # Enable to always load the default rulesets

-- 
Herbert
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2014-07-05 19:07:50 UTC
It sounds like your system has not been patched, and is missing at least the FreeBSD-SA-14:07.devfs security advisory patch.
Comment 4 joeb1 2014-07-06 00:41:59 UTC
security advisory -p1 changes 
/etc/defaults/rc.conf parameter
devfs_load_rulesets="NO"  to  devfs_load_rulesets="YES"

That fixed this problem for me.
Comment 5 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:42:09 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2018-05-29 14:47:42 UTC
See comment #4