All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexei Starovoitov" <alexei.starovoitov@gmail.com>
To: "Nicholas Dudar" <main.kalliope@gmail.com>, <ast@kernel.org>,
	<daniel@iogearbox.net>, <andrii@kernel.org>, <eddyz87@gmail.com>,
	<memxor@gmail.com>, <akpm@linux-foundation.org>
Cc: <martin.lau@linux.dev>, <song@kernel.org>,
	<yonghong.song@linux.dev>, <jolsa@kernel.org>,
	<emil@etsalapatis.com>, <ihor.solodrai@linux.dev>,
	<davem@davemloft.net>, <bpf@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <deller@gmx.de>
Subject: Re: [PATCH bpf] bpf: Fix page double free in test_bpf skb setup
Date: Thu, 17 Sep 2026 03:11:30 +0000	[thread overview]
Message-ID: <DLH9GNAO4JH7.Q7DM1I60M8TP@gmail.com> (raw)
In-Reply-To: <20260917023834.2760055-1-main.kalliope@gmail.com>

On Thu Sep 17, 2026 at 2:38 AM UTC, Nicholas Dudar wrote:
> build_test_skb() transfers page ownership to an skb with
> skb_add_rx_frag(). If either allocation in the second loop iteration fails,
> kfree_skb() releases page[0], but the error path then falls through and
> frees page[0] again.
>
> Return after freeing skb[0], since page[0] is already owned by the skb at
> that point; the raw page cleanup is only correct for the first iteration.
>
> Fixes: 76db8087c4c9 ("net: bpf: add a test for skb_segment in test_bpf module")
> Assisted-by: Codex:gpt-6-astra
> Signed-off-by: Nicholas Dudar <main.kalliope@gmail.com>
> ---
> Please queue this fix for stable. The double-free has been present since
> v4.17 and is reachable when the test_bpf skb test encounters an allocation
> failure.

No.
I don't think you have a way to reproduce it.
We don't scream "bug... apply to stable" just because AI found a tiny
race.

pw-bot: cr


      reply	other threads:[~2026-09-17  3:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17  2:38 [PATCH bpf] bpf: Fix page double free in test_bpf skb setup Nicholas Dudar
2026-09-17  3:11 ` Alexei Starovoitov [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=DLH9GNAO4JH7.Q7DM1I60M8TP@gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=deller@gmx.de \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=main.kalliope@gmail.com \
    --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.