]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
fuse2fs: fix various problems in get_req_groups
authorDarrick J. Wong <djwong@kernel.org>
Fri, 8 Aug 2025 16:27:39 +0000 (09:27 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 21 Aug 2025 00:00:54 +0000 (17:00 -0700)
commit6d6f7b7a1fba4cda551ab8851bc5172457bd3f13
treeb455a15f6728ecf40870cc4f43e6fbc82a3fa46b
parentbc1279f60fde251991030d3aaec7711d2c6eb4b0
fuse2fs: fix various problems in get_req_groups

get_req_groups has two problems: first, it doesn't free the array if
fuse_getgroups errors out; and it passes errors to its caller.  The
memory leak is an obvious fix, but in the error case we actually want to
fall back to checking the sole gid that the fuse request context gave
us.  Fix both of these errors.

Cc: <linux-ext4@vger.kernel.org> # v1.47.3
Fixes: 3469e6ff606af8 ("fuse2fs: fix group membership checking in op_chmod")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
misc/fuse2fs.c