All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Maks Mishin <maks.mishinfz@gmail.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH] scripts: Fix potential null-deref
Date: Mon, 3 Feb 2025 15:48:05 -0600	[thread overview]
Message-ID: <20250203214805.GZ1233568@bill-the-cat> (raw)
In-Reply-To: <20250203165008.4088496-1-maks.mishinFZ@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 934 bytes --]

On Mon, Feb 03, 2025 at 07:50:08PM +0300, Maks Mishin wrote:

> After having been compared to a NULL value at menu.c:799, 
> pointer 'sym' is dereferenced at menu.c:812.
> 
> Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
> ---
>  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 0fe7f3255a..c823719dfd 100644
> --- a/scripts/kconfig/menu.c
> +++ b/scripts/kconfig/menu.c
> @@ -809,8 +809,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);
>  	if (prop) {

Has this been fixed already in the Linux Kernel, where we get this code
from? Thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2025-02-03 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 16:50 [PATCH] scripts: Fix potential null-deref Maks Mishin
2025-02-03 21:48 ` Tom Rini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-04-18  8:19 ant.v.moryakov
2025-04-18 13:51 ` Quentin Schulz
2025-04-18 14:18   ` 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=20250203214805.GZ1233568@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=maks.mishinfz@gmail.com \
    --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.