From: Tom Rini <trini@konsulko.com>
To: Quentin Schulz <quentin.schulz@cherry.de>
Cc: ant.v.moryakov@gmail.com, u-boot@lists.denx.de,
Maks Mishin <maks.mishinFZ@gmail.com>
Subject: Re: [PATCH] scripts: Fix potential null-deref
Date: Fri, 18 Apr 2025 08:18:29 -0600 [thread overview]
Message-ID: <20250418141829.GQ5495@bill-the-cat> (raw)
In-Reply-To: <ebd844d2-fa08-4e5c-b5c1-554d1e86ea27@cherry.de>
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
On Fri, Apr 18, 2025 at 03:51:42PM +0200, Quentin Schulz wrote:
> Hi Maks(?)
>
> On 4/18/25 10:19 AM, ant.v.moryakov@gmail.com wrote:
> > From: Maks Mishin <maks.mishinFZ@gmail.com>
> >
> > Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
>
> This seems to differ from the sender. Are you Maks? If not, you need to add
> your Signed-off-by to fulfill the DCO requirements.
>
> > ---
> > scripts/kconfig/menu.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
> > index 5c5c1374..a0d0d2af 100644
> > --- a/scripts/kconfig/menu.c
> > +++ b/scripts/kconfig/menu.c
> > @@ -812,8 +812,10 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym,
> > }
> > }
> > }
> > - for_all_prompts(sym, prop)
> > - get_prompt_str(r, prop, head);
> > + if (sym) {
> > + for_all_prompts(sym, prop)
> > + get_prompt_str(r, prop, head);
> > + }
> > prop = get_symbol_prop(sym);
>
> This one too can do a null-deref.
>
> And same for some other functions after as well.
>
> Wondering if we shouldn't update the macros to not enter the for loops if
> sym is NULL? So we don't have to patch every caller?
The feedback I had with the original patches here was to bring this up
with the linux kernel community first as this comes from them (and
there's a much wider security-focused set or reviewers there). We can
then easily backport fixes.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2025-04-18 14:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 8:19 [PATCH] scripts: Fix potential null-deref ant.v.moryakov
2025-04-18 8:19 ` [PATCH] tools: Fix memory and descriptor leak ant.v.moryakov
2025-04-18 13:51 ` Quentin Schulz
2025-04-18 8:19 ` [PATCH] tools: Fix potential memory leak in aisimage.c ant.v.moryakov
2025-04-18 13:52 ` Quentin Schulz
2025-04-18 8:19 ` [PATCH] tools: image-host: Fix potential memory leak ant.v.moryakov
2025-04-18 13:52 ` Quentin Schulz
2025-04-18 13:51 ` [PATCH] scripts: Fix potential null-deref Quentin Schulz
2025-04-18 14:18 ` Tom Rini [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-03 16:50 Maks Mishin
2025-02-03 21:48 ` Tom Rini
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=20250418141829.GQ5495@bill-the-cat \
--to=trini@konsulko.com \
--cc=ant.v.moryakov@gmail.com \
--cc=maks.mishinFZ@gmail.com \
--cc=quentin.schulz@cherry.de \
--cc=u-boot@lists.denx.de \
/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.