Skip to content

Conversation

@garlick
Copy link
Member

@garlick garlick commented Oct 30, 2025

Problem: the linux v9fs client has added a new access mode client which appears to be the same as our default of user but 1) is documented to provide client side access checks (even though user also does) and 2) is required for posixacl.

Even though there is no real change in functionality, it probably makes sense to change the default mount.diod access option to client given that diod relies on the client side checks. That way if the two options deviate in vf9s in the future, we'll have picked the right one. Also it means adding posixacl will just work.

In the process of reading about this and recalling diod's security design, and thinking of past user confusion and my crap memory, I wrote up a SECURITY section in the diod(8) man page to explain it all (likely to my future self!)

Copy link
Member

@grondo grondo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on a quick pass. Just saw one typo and one suggestion from a Claude review I wasn't sure about.

man/diod.8.in Outdated
the simplest and safest mode for \fBdiod\fR to operate in from a security
standpoint.
.LP
Muti-user support is intended to be paired with the Linux v9fs client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Muti-user/Multi-user/

Comment on lines 145 to 147
Server worker threads handling a request on behalf of a non-root user on
a connection authenticated as root set \fBCAP_DAC_BYPASS\fR, \fBCAP_CHOWN\fR,
and \fBCAP_FOWNER\fR. The v9fs client is assumed to be performing access
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - Claude code review called out that CAP_DAC_BYPASS may be a typo since CAP_DAC_OVERRIDE is more likely. I'm not about that, so thought I'd just share it for consideration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, that's right!

Problem: the diod github wiki includes a security page that was
out of date.

Add a SECURITY section to the diod(8) man page so we can remove
the wiki page.
Problem: mount.diod currently defaults to access=user, but
access=client more closely describes what diod assumes v9fs
will do.

Both access=user and access=client enforce access controls at
the client, but access=client was added specifically to underscore
this behavior and is required when posixacl is also specified.

Since diod's use of CAP_DAC_OVERRIDE assumes that the v9fs client
is performing access checks, we'd better use the name that is
documented to do it.

Currently, other than posixacl requiring access=client, there do
not appear to be any differences between the two modes.  However,
since a new mode was added, potentially someone thinks that could
change.

Change the default to access=client.
Problem: the mount options listed in mount.diod(8) are no longer
accurate.

Note that the default access mode is now "client".

Cull descriptions of lesser used options and include a reference
to the kernel documentation.

Clarify descriptions of some options.
Problem: several tests specify access=user where access=client
is more appropriate.

Use access=client in the main v9fs multiuser test.

Use mount.diod with defaults in the rsync test.

Use mount.diod with defaults + -o posixacl in the ACL test.
@garlick
Copy link
Member Author

garlick commented Oct 31, 2025

Thanks! Fixes pushed and setting MWP.

@mergify mergify bot added the queued label Oct 31, 2025
@mergify mergify bot merged commit 087b787 into chaos:master Oct 31, 2025
7 checks passed
@mergify mergify bot removed the queued label Oct 31, 2025
@garlick garlick deleted the access_client branch October 31, 2025 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants