From: Viacheslav Dubeyko <slava@dubeyko.com>
To: Lei Qiu <750592120@qq.com>,
John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
Yangtao Li <frank.li@vivo.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v2] hfs/hfsplus: validate uid and gid mount options
Date: Wed, 18 Nov 2026 10:49:40 -0800 [thread overview]
Message-ID: <85c26064db32f34da57b313a2e5d505f60ad1df4.camel@dubeyko.com> (raw)
In-Reply-To: <tencent_684DDE3E94F7C2470E5E02BF79AB1A1DB906@qq.com>
On Wed, 2026-11-18 at 16:28 +0800, Lei Qiu wrote:
> The conversions to the new mount API declare uid and gid as
> fsparam_u32
> but consume result.uid and result.gid. This bypasses make_kuid() and
> make_kgid() as well as the validity checks in the old parsers. As a
> result, both filesystems accept the invalid ID 4294967295, and IDs
> supplied through fsconfig() in a non-initial user namespace are
> treated
> as raw kernel IDs instead of being translated through that namespace.
>
> Use fsparam_uid and fsparam_gid so the shared parser translates the
> IDs
> and rejects invalid or unmapped values before storing the typed
> result.
>
> Verify both modules with W=1 builds and a before/after QEMU test
> covering
> fsconfig(), legacy mounts, and a filesystem context configured from a
> user namespace mapping ID 0 to ID 1000. The fix rejects invalid IDs
> with
> EINVAL and preserves the mapped ownership and valid mount options.
>
> OpenAI Codex assisted with identifying the issue, implementing the
> fix
> and reproducer, and running the validation.
>
> Fixes: ffcd06b6d13b ("hfs: convert hfs to use the new mount api")
> Fixes: 432f7c78cb00 ("hfsplus: convert hfsplus to use the new mount
> api")
> Cc: stable@vger.kernel.org
> Signed-off-by: Lei Qiu <750592120@qq.com>
> ---
> Changes since v1: realigned the new fsparam_uid/gid entries with the
> existing column style in both option tables (no functional change).
> ---
> build.log | 35380
> +++++++++++++++++++++++++++++++++++++++++
> fs/hfs/super.c | 4 +-
> fs/hfsplus/options.c | 4 +-
> 3 files changed, 35384 insertions(+), 4 deletions(-)
> create mode 100644 build.log
>
> diff --git a/build.log b/build.log
> new file mode 100644
> index 000000000..abd0bdf55
> --- /dev/null
> +++ b/build.log
> @@ -0,0 +1,35380 @@
> + UPD arch/x86/include/generated/asm/cpufeaturemasks.h
> + DESCEND objtool
> + CC arch/x86/kernel/asm-offsets.s
<skipped>
Why build.log has been included in the patch?
Thanks,
Slava.
prev parent reply other threads:[~2026-11-18 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261117024431.21914-1-750592120@qq.com>
2026-11-17 2:44 ` [PATCH] " Lei Qiu
2026-11-18 8:28 ` [PATCH v2] " Lei Qiu
2026-11-18 18:49 ` Viacheslav Dubeyko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85c26064db32f34da57b313a2e5d505f60ad1df4.camel@dubeyko.com \
--to=slava@dubeyko.com \
--cc=750592120@qq.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®