HomeFreeBSD

fuse: Fix GID when sending FUSE_INTERRUPT to a FUSE daemon

Description

fuse: Fix GID when sending FUSE_INTERRUPT to a FUSE daemon

Due to the partial-only changes of commit 46c07316f906 ("kern: adopt the
cr_gid macro for cr_groups[0] more widely"), subsequent commit
be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
caused a mismatch between filling cr_groups[0] in 'reused_creds' in
fuse_interrupt_send() and reading 'cr_gid' from it in
fuse_setup_ihead(), with the consequence that the kernel would send
a FUSE_INTERRUPT message to the FUSE deamon with an uninitialized GID in
its header (which, besides being wrong, would disclose 4 bytes from its
stack).

Fixes: be1f7435ef218b1d ("kern: start tracking cr_gid outside of cr_groups[]")
MFC after: 5 days
MFC to: stable/15
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52255

(cherry picked from commit d22592cd6fd2d39432add376dad460a66488a846)

Details

Provenance
olceAuthored on Aug 26 2025, 12:39 PM
Differential Revision
D52255: fuse: Fix GID when sending FUSE_INTERRUPT to a FUSE daemon
Parents
rG052d8f6acf46: unix: SCM_CREDS: Restore passing the effective GID
Branches
Unknown
Tags
Unknown