|
|
Message-ID: <20261130134458.GH5716@brightrain.aerifal.cx>
Date: Mon, 30 Nov 2026 08:44:59 -0500
From: Rich Felker <dalias@...c.org>
To: convre <c0nvr3@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: wordexp() executes unquoted shell metacharacters that
POSIX requires it to reject (flags without WRDE_NOCMD); WRDE_UNDEF
unimplemented
On Mon, Nov 30, 2026 at 01:50:02PM +0800, convre wrote:
> Hello,
>
> I'd like to report a security-relevant conformance gap in musl's
> wordexp() that I hope can be fixed. Everything below was tested locally
> [...]
> On musl, wordexp("a; : > /tmp/marker", &we, 0) returns 0 and the marker
> file is created; on glibc the same call returns WRDE_BADCHAR and nothing
> is executed. WRDE_UNDEF/WRDE_BADVAL are also unimplemented (an undefined
> variable under WRDE_UNDEF silently expands to zero words instead of
> failing).
I don't see how it's security-relevant that "a; : > /tmp/marker"
creates a marker when "$(> /tmp/marker)" can already do that. There is
a discussion to be had about changes to wordexp, but framing it as a
security finding is not helpful.
If you have a bug to report, PLEASE keep the SNR high. This report had
a few bits of actual information content and pages of LLM slop. Please
do not send LLM slop to the list. This is a no-slop project and
LLM-generated patches *or directions of suggested development
direction* are not welcome. The above-quoted text is pretty much the
entire information content.
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.