Page MenuHomeFreeBSD

jail: Add the ability to access system-level filesystem extended attributes
ClosedPublic

Authored by dchagin on Aug 30 2023, 8:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 30, 4:07 PM
Unknown Object (File)
Thu, Apr 25, 10:56 PM
Unknown Object (File)
Thu, Apr 25, 10:56 PM
Unknown Object (File)
Thu, Apr 25, 1:46 PM
Unknown Object (File)
Thu, Apr 25, 7:15 AM
Unknown Object (File)
Thu, Apr 25, 7:11 AM
Unknown Object (File)
Mar 13 2024, 4:09 AM
Unknown Object (File)
Mar 13 2024, 4:09 AM
Subscribers

Details

Summary

Prior to this commit privileged accounts in a jail could not access to the
filesystem extended attributes in the system namespace. To control access to
the system namespace in a per-jail basis add a new configuration parameter
allow.extattr which is off by default.

Reported by: zirias
Obtained from: HardenedBSD
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/kern/kern_jail.c
223

Do we create an KBI issue if we have conditional items in-between?

4063

The other PRIVs have a comment with an explanation why we have the PRIV.

4567

Same comment as above.

usr.sbin/jail/jail.8
646

s/jail/jail to/ ? Beware, english is not my native language.

Maybe also add an explicit mention about the non-system namespace, to make it clear if it is affected by this or not?

sys/kern/kern_jail.c
223

Negative

usr.sbin/jail/jail.8
646

Yes, "jail to ..."

dchagin added inline comments.
sys/kern/kern_jail.c
223

I don't see how

usr.sbin/jail/jail.8
646

Well, I added a link to extattr(9) that mentions privileges in the user namespace

Apart from the man page I have no further suggestions.

usr.sbin/jail/jail.8
646

The extattr(9) man page doesn't talk about limitations in jails. As such I propose to add the sentence "Other extattr namespaces are not affected by this setting (they are not restricted by jails)." or something to the effect that it makes clear that only the system namespace is limited in jails and that this setting removes this restriction.

usr.sbin/jail/jail.8
646

The extattr(9) man page doesn't talk about limitations in jails. As such I propose to add the sentence "Other extattr namespaces are not affected by this setting (they are not restricted by jails)." or something to the effect that it makes clear that only the system namespace is limited in jails and that this setting removes this restriction.

I agree with the first sentence, maybe it would be better to fix the extattr(9)? The statement about system namespace restrictions is not clear, per my POV

This revision is now accepted and ready to land.Aug 31 2023, 1:56 PM