Bug 258481 - Jail information leak via zfs kstats
Summary: Jail information leak via zfs kstats
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-jail (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-13 16:52 UTC by Alan Somers
Modified: 2021-09-19 16:15 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2021-09-13 16:52:45 UTC
A jailed user can determine the names and throughput of ZFS datasets that aren't accessible in the jail, by querying the kstat.zfs.zroot.dataset tree.  For example:

[asomers@universe14a ~]$ sysctl kstat.zfs | grep dataset_name
kstat.zfs.zroot.dataset.objset-0x81.dataset_name: zroot/var/tmp
kstat.zfs.zroot.dataset.objset-0x7a.dataset_name: zroot/var/spool
kstat.zfs.zroot.dataset.objset-0x73.dataset_name: zroot/var/run
kstat.zfs.zroot.dataset.objset-0x6c.dataset_name: zroot/var/log
kstat.zfs.zroot.dataset.objset-0x65.dataset_name: zroot/var/empty
kstat.zfs.zroot.dataset.objset-0x5e.dataset_name: zroot/var/db
kstat.zfs.zroot.dataset.objset-0x8f.dataset_name: zroot/var/cache/pkg
kstat.zfs.zroot.dataset.objset-0x88.dataset_name: zroot/var/cache
kstat.zfs.zroot.dataset.objset-0x57.dataset_name: zroot/var
kstat.zfs.zroot.dataset.objset-0x29.dataset_name: zroot/usr/src
kstat.zfs.zroot.dataset.objset-0x45.dataset_name: zroot/usr/obj
kstat.zfs.zroot.dataset.objset-0x50.dataset_name: zroot/usr/local
kstat.zfs.zroot.dataset.objset-0x3b.dataset_name: zroot/usr
kstat.zfs.zroot.dataset.objset-0x34.dataset_name: zroot/tmp
kstat.zfs.zroot.dataset.objset-0x39b.dataset_name: zroot/j/jails/universe14a/scratch
kstat.zfs.zroot.dataset.objset-0x596.dataset_name: zroot/j/jails/universe14a/home
kstat.zfs.zroot.dataset.objset-0xad.dataset_name: zroot/j/jails/universe14a
kstat.zfs.zroot.dataset.objset-0x1b0.dataset_name: zroot/j/jails/universe13a/scratch
kstat.zfs.zroot.dataset.objset-0x1aa.dataset_name: zroot/j/jails/universe13a/home
kstat.zfs.zroot.dataset.objset-0x1a4.dataset_name: zroot/j/jails/universe13a
kstat.zfs.zroot.dataset.objset-0x1cd.dataset_name: zroot/j/jails/universe12a/scratch
kstat.zfs.zroot.dataset.objset-0x1d3.dataset_name: zroot/j/jails/universe12a/home
kstat.zfs.zroot.dataset.objset-0x11e.dataset_name: zroot/j/jails/universe12a
kstat.zfs.zroot.dataset.objset-0xde.dataset_name: zroot/j/jails/universe11a/scratch
kstat.zfs.zroot.dataset.objset-0xd2.dataset_name: zroot/j/jails/universe11a/home
kstat.zfs.zroot.dataset.objset-0x98.dataset_name: zroot/j/jails/universe11a
kstat.zfs.zroot.dataset.objset-0x59.dataset_name: zroot/j/jails
kstat.zfs.zroot.dataset.objset-0x3f.dataset_name: zroot/j
kstat.zfs.zroot.dataset.objset-0x192ec.dataset_name: zroot/git
kstat.zfs.zroot.dataset.objset-0x2d.dataset_name: zroot/home
kstat.zfs.zroot.dataset.objset-0x15.dataset_name: zroot