Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20261129031925.GA5716@brightrain.aerifal.cx>
Date: Sat, 28 Nov 2026 22:19:25 -0500
From: Rich Felker <dalias@...c.org>
To: Georg Meyer <dev@...roup.ch>
Cc: musl@...ts.openwall.com
Subject: Re: regcomp: NULL dereference in marksub when
 tre_ast_new_union fails, under a failed allocation

On Sat, Nov 28, 2026 at 09:55:53PM -0500, Rich Felker wrote:
> On Sat, Nov 28, 2026 at 09:07:28PM -0500, Georg Meyer wrote:
> > In src/regex/regcomp.c, around the end of group/alternation parsing:
> > 
> >     nunion = tre_ast_new_union(ctx->mem, nunion, nbranch);
> >     nbranch = 0;
> >     ...
> >     err = marksub(ctx, nunion, tre_stack_pop_int(stack));
> > 
> > tre_ast_new_union's result is never checked before it is passed into
> > marksub().
> 
> Thanks.
> 
> > Suggested fix for reports/musl-regex-marksub-null.txt.
> > [...]
> 
> The start of the commit messgae makes this look LLM-generated. Please
> do not send any LLM-emitted patches to the list. We cannot use them
> and in general they are potentially tainting. In this case it probably
> doesn't matter, but just don't. A patch does not help. Someone who has
> read and understands the actual bug report can trivially write a fix.
> Having a bad-provenance proposed fix just potentially short-circuits
> that process.

Also, if you'd like to get cc'd on replies, can you ask your mail
provider to fix the block that's preventing me from replying to you?
I'm getting:

550-Unauthenticated mail not allowed from this range to protected domain,
550 nonspam senders request

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.