On Sun, Mar 9, 2025 at 5:46 AM Andrew Walker <awal...@ixsystems.com> wrote:
>
> Out of curiosity, how are you preventing users from creating / writing
> xattrs with the `system?` name prefix. In ZFS on FreeBSD IIRC this
> prefix is used to determine whether the corresponding attribute when
> accessed via the extattr interface is in the user or system
> namespaces.
A couple of comments...
1 - My current thinking would be a ZFS fs would be configured for one
     or the other (mixing them is weird as noted by the next comment),
     There is currently the xattr property that can be set to "dir" or "sa".
2 - I haven't looked at system space FreeBSD attributes yet (I will),
     but when mixing them, you can get two attributes with the same name
     showing up in the named attribute directory (the open gets the named
     attribute one). I haven't yet figured out how to get rid of the duplicate.
3 - I assume the patch could include code that excludes "system.xxx" names
     from the directory. (I'll do some testing.)

> I vaguely recall some people may have patched the FreeBSD
> samba server for instance so that it writes security information
> related into the system namespace when samba is configured as a domain
> controller so some care needs to be taken with namespaces.
>
> You may also need to potentially restrict ones with `security.` and
> `trusted.` prefixes in case the ZFS data is replicated to Linux
> systems (because those are privileged namespaces and it may introduce
> a CVE).
Thank for the info. I didn't know what Linux does.

rick

Reply via email to