All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Shihuang Liu" <shlomojune6@gmail.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH v1] net: sock_reuseport: check program type on the migration path
Date: Sun, 15 Nov 2026 15:29:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-215630@kernel.org> (raw)
In-Reply-To: <20261115152408.48205-1-shlomojune6@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] net: sock_reuseport: placeholder Signed-off-by trailer in
  commit message
--

commit cfe7ad076364a4b63b18cb16611dd2ffb1e3f230
Author: Linux kernel audit <audit@example.invalid>

> net: sock_reuseport: check program type on the migration path
>
> A BPF_PROG_TYPE_SOCKET_FILTER program can be loaded with
> expected_attach_type set to BPF_SK_REUSEPORT_SELECT_OR_MIGRATE and
> attached to a SO_REUSEPORT TCP group; both steps are allowed without
> CAP_BPF.  Closing a listener that still has queued children then runs
> that socket filter with a struct sk_reuseport_kern as its context,
> while the program was verified against struct sk_buff.  It reads and
> writes past the 56-byte object on the stack, which KASAN reports as a
> stack-out-of-bounds in ___bpf_prog_run().
>
> The cause is that reuseport_migrate_sock() decides from
> prog->expected_attach_type alone.  That field is supplied by user
> space and does not identify the program type, and
> bpf_prog_load_check_attach() does not reject the value for
> SOCKET_FILTER programs.
>
> Fix this by requiring BPF_PROG_TYPE_SK_REUSEPORT before running the
> program, and use the same check in reuseport_stop_listen_sock().
> Socket filters can still be attached and used as selectors; the
> selection path is unchanged.
>
> Fixes: d5e4ddaeb6ab ("bpf: Support socket migration by eBPF.")
> Signed-off-by: Linux kernel audit <audit@example.invalid>

[Severity: High]
The Signed-off-by trailer uses a placeholder identity and a non-routable
.invalid email address instead of a real developer name and routable
email address as required by the Developer's Certificate of Origin.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261115152408.48205-1-shlomojune6@gmail.com?part=1

  parent reply	other threads:[~2026-11-15 15:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 15:24 [PATCH v1] net: sock_reuseport: check program type on the migration path Shihuang Liu
2026-11-15 15:28 ` netdev-bot+sinfo
2026-11-15 15:29 ` sashiko-bot [this message]
2026-11-15 15:43 ` J4f J4f

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=sashiko-outbox-215630@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=shlomojune6@gmail.com \
    /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.