From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: yocto-patches@lists.yoctoproject.org
Cc: seebs@seebs.net, mark.hatle@kernel.crashing.org
Subject: Re: [yocto-patches] [pseudo] [PATCH] pseudo_client: Fix xattr/rename handling with empty paths
Date: Thu, 15 Oct 2026 12:44:54 +0100 [thread overview]
Message-ID: <4df5ef33f443128b352bca87d148a2abb574f3c9.camel@linuxfoundation.org> (raw)
In-Reply-To: <18DE7C971DAD1AD4.2478941@lists.yoctoproject.org>
On Wed, 2026-10-14 at 20:38 +0100, Richard Purdie via lists.yoctoproject.org wrote:
> On Fedora45, we can end up in a situation where path_extra_1 (for xattr/rename ops)
> but path is of zero length. The path_extra_1 codepath does not handle this well and
> corrupts memory.
>
> The issue is "partial_len = pathlen - 1 - strip_slash" when pathlen is 0 (and
> hence strip_slash is also 0). This leads to invalid memory writes and if those
> happen to access off the end of a mapped segment, the program segfaults.
>
> Fix the code to handle the pathlen=0 case.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> pseudo_client.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
I had wondered why we had something with a file descriptor which has no
path, I was worried we were not tracking some kind of fd creation we
should be.
The answer is it is a unix domain socket. It therefore does have a path
we could track but we'd not be able to do much with it anyway so it
doesn't really matter.
The reproducer is therefore calling fgetxattr() on a domain socket
which glibc does for nameserver type operations.
Cheers,
Richard
next parent reply other threads:[~2026-10-15 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <18DE7C971DAD1AD4.2478941@lists.yoctoproject.org>
2026-10-15 11:44 ` Richard Purdie [this message]
2026-10-14 19:38 [pseudo] [PATCH] pseudo_client: Fix xattr/rename handling with empty paths Richard Purdie
2026-10-15 13:38 ` [yocto-patches] " Mathieu Dubois-Briand
2026-10-15 14:25 ` Richard Purdie
2026-10-15 15:43 ` Mathieu Dubois-Briand
2026-10-15 21:54 ` Richard Purdie
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=4df5ef33f443128b352bca87d148a2abb574f3c9.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=mark.hatle@kernel.crashing.org \
--cc=seebs@seebs.net \
--cc=yocto-patches@lists.yoctoproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.