mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Sean Young <sean@mess.org>, parisc-linux@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] parisc: unwind: Replace open-coded binary search with bsearch()
Date: Tue, 15 Sep 2026 09:31:20 +0200	[thread overview]
Message-ID: <4da6291f-45ab-4651-a824-b5efb945e8f3@gmx.de> (raw)
In-Reply-To: <20260913141228.176399-1-sean@mess.org>

On 9/13/26 16:12, Sean Young wrote:
> There is a bug in the binary search where hi can underflow. If
> addr is less than the first entry, then "hi = mid - 1" will underflow
> to ULONG_MAX. Then we have an out-of-bounds read.
> 
> Replace the open-coded binary search with bsearch().
> 
> Issue found by an LLM.
> 
> Signed-off-by: Sean Young <sean@mess.org>
> ---
>   arch/parisc/kernel/unwind.c | 33 +++++++++++++++------------------
>   1 file changed, 15 insertions(+), 18 deletions(-)
Applied.

Thanks!
Helge

      reply	other threads:[~2026-09-15  7:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 14:12 Sean Young
2026-09-15  7:31 ` Helge Deller [this message]

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=4da6291f-45ab-4651-a824-b5efb945e8f3@gmx.de \
    --to=deller@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=parisc-linux@vger.kernel.org \
    --cc=sean@mess.org \
    /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

all inboxes | Powered by JetHome®