All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Thorsten Blum" <blum@kernel.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Song Liu" <song@kernel.org>, "Jiri Olsa" <jolsa@kernel.org>,
	"Ihor Solodrai" <ihor.solodrai@linux.dev>,
	"Daniel Borkmann" <daniel@iogearbox.net>,
	"Andrii Nakryiko" <andrii@kernel.org>,
	"Eduard Zingerman" <eddyz87@gmail.com>,
	"Kumar Kartikeya Dwivedi" <memxor@gmail.com>,
	"Martin KaFai Lau" <martin.lau@linux.dev>,
	"Yonghong Song" <yonghong.song@linux.dev>,
	"Emil Tsalapatis" <emil@etsalapatis.com>
Cc: <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH bpf-next v2] lib/buildid: Avoid wraparound when aligning ELF note sizes
Date: Sat, 05 Dec 2026 16:34:44 +0000	[thread overview]
Message-ID: <DNCY0OKQZ0ZC.1KDUESVZLO2VK@gmail.com> (raw)
In-Reply-To: <20261205131119.105160-2-blum@kernel.org>

On Sat, Dec 05, 2026 at 05:11 AM Thorsten Blum <blum@kernel.org> wrote:
> For u32 note sizes, ALIGN() wraps the values 0xfffffffd through
> 0xffffffff to 0 before check_add_overflow() runs. Parsing can then
> continue as if the affected size were 0.
>
> Use u64 for name_sz and desc_sz to avoid alignment wraparound, allowing
> check_add_overflow() to reject these malformed notes early.

The code is the same as in v1. Only the log changed.
The reason for rejection is the same as before: nothing is broken.
It doesn't harden anything either. The owner of the file writes 0
instead of 0xffffffff and gets the same walk. Size 0 is valid.
I don't think we need this patch.

pw-bot: cr

  parent reply	other threads:[~2026-12-05 16:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-05 13:11 [PATCH bpf-next v2] lib/buildid: Avoid wraparound when aligning ELF note sizes Thorsten Blum
2026-12-05 13:43 ` bot+bpf-ci
2026-12-05 16:34 ` Alexei Starovoitov [this message]
2026-12-05 17:14   ` Thorsten Blum

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=DNCY0OKQZ0ZC.1KDUESVZLO2VK@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=blum@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /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.