public inbox for dwarves@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Maguire <alan.maguire@oracle.com>
To: "Håvard F. Aasen" <havard.f.aasen@pfft.no>,
	dwarves@vger.kernel.org, acme@kernel.org
Subject: Re: [PATCH 1/1] elfcreator: Fix NULL dereference in remove_dyn()
Date: Mon, 12 Jan 2026 11:07:06 +0000	[thread overview]
Message-ID: <5646ea17-77ec-4d07-862e-45c5fa7effec@oracle.com> (raw)
In-Reply-To: <20260107212912.1619603-2-havard.f.aasen@pfft.no>

On 07/01/2026 21:29, Håvard F. Aasen wrote:
> scncopy segfaults when the requested section does not exist. In this
> case, generic_dyn_fixup_fn() (and the related rela_dyn_fixup_fn() and
> rel_dyn_fixup_fn()) may receive both a NULL 'dyn' and a NULL 'shdr'.
> The code only checks 'shdr' and implicitly assumes 'dyn' is valid in
> the else branch.
> 
> This leads to a NULL dereference in remove_dyn() when ctor->dynshdr is
> NULL.
> 
> Add a NULL check to prevent the crash.
> 
> Signed-off-by: Håvard F. Aasen <havard.f.aasen@pfft.no>

Looks good, I verified the fix resolves the segmentation fault. Applied.
Thank you!

Alan

  reply	other threads:[~2026-01-12 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 21:29 [PATCH 0/1] elfcreator: Fix NULL dereference in remove_dyn() Håvard F. Aasen
2026-01-07 21:29 ` [PATCH 1/1] " Håvard F. Aasen
2026-01-12 11:07   ` Alan Maguire [this message]
2026-01-07 21:29 ` [PATCH 1/1] Fix segmentation fault " Håvard F. Aasen

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=5646ea17-77ec-4d07-862e-45c5fa7effec@oracle.com \
    --to=alan.maguire@oracle.com \
    --cc=acme@kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=havard.f.aasen@pfft.no \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox