Skip to content

Conversation

CismonX
Copy link
Contributor

@CismonX CismonX commented Oct 15, 2025

To use the extended fields in struct fuse_setxattr_in, checking the ABI version is not enough.

The client must declare that it supports this feature in the FUSE_INIT request, and only enable the feature if the server explicitly asks for it.

To use the extended fields in struct fuse_setxattr_in,
checking the ABI version is not enough.

The client must declare that it supports this feature in the
FUSE_INIT request, and only enable the feature if the server
explicitly asks for it.

Signed-off-by: CismonX <[email protected]>
@CismonX
Copy link
Contributor Author

CismonX commented Oct 15, 2025

@asomers Please review.

I think this issue needs to be resolved before 15.0-RELEASE rolls out, since it's already affecting libfuse users (bad setxattr regardless of server configuration).

@asomers
Copy link
Member

asomers commented Oct 15, 2025

How is it affecting libfuse users? Are there bug reports about it?

@CismonX
Copy link
Contributor Author

CismonX commented Oct 15, 2025

How is it affecting libfuse users?

The server and client share mismatched assumptions on the size of struct fuse_setxattr_in:
libfuse always assume that the struct is 8 bytes long (since the kernel does not declare FUSE_SETXATTR_EXT support in the FUSE_INIT request); meanwhile, the kernel always assume 16 bytes - the last 8 bytes being zero.

When sending FUSE_SETXATTR request, the xattr name is sent after struct fuse_setxattr_in, and then the xattr value. Which means libfuse always get an empty xattr name and a bad xattr value.

The issue is introduced in commit d5e3cf4 and only affects CURRENT and 15.

Are there bug reports about it?

I discovered this issue while testing my own fuse server on CURRENT.

If you want a formal bug report, I could post one to bugs.freebsd.org.

@asomers
Copy link
Member

asomers commented Oct 15, 2025

Yes, please file a bug report, including steps to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants