Netdev List
 help / color / mirror / Atom feed
From: co <co+63bad23bb3b4cd85@bugs.sh>
To: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	bridge@lists.linux.dev, netdev@vger.kernel.org,
	"Pablo Neira Ayuso" <pablo@netfilter.org>,
	"Florian Westphal" <fw@strlen.de>,
	"Nikolay Aleksandrov" <razor@blackwall.org>,
	"Ido Schimmel" <idosch@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Sabrina Dubroca" <sd@queasysnail.net>,
	"Phil Sutter" <phil@nwl.cc>, "Simon Horman" <horms@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: [BUG] net/bridge: out-of-bounds in br_forward()
Date: Thu, 27 Aug 2026 12:43:08 +0000	[thread overview]
Message-ID: <fai12uKS5302YnCQV4E3zlDqcsAS5aGcMutS@bugs.sh> (raw)

We found a bug reachable in:

    path    net/bridge/netfilter
    crash   out-of-bounds in br_forward()
    commit  7b5344954050 ("Merge tag 'nf-26-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf")

Config, environment, the sanitizer report and a C reproducer follow.

== Notes ===============================================================
    If you patch the bug based on our artifacts, a tag would be
    appreciated:

Reported-by: co+63bad23bb3b4cd85@bugs.sh

    Everything in this mail is validated by the reproducer below.

    We also hold an LLM-generated root-cause analysis and a candidate
    patch. The patch passes an A/B test: the same reproducer panics the
    unpatched kernel and runs clean on the patched one. Neither has had
    human review, so both still require validation before you send or
    apply them. Available on:

        patch.diff  https://bugs.sh/b/63bad23bb3b4cd85/patch.diff
        report.md   https://bugs.sh/b/63bad23bb3b4cd85/report.md

    This is an open science project. The code and the full set of PoCs
    are not public at this moment, as we intend to disclose our findings
    in an ethical way.

    Happy to test patches. Complaints and suggestions about our work
    are welcome at:

        cedalion@bugs.sh

== Environment =========================================================
    Reproduced on  7b5344954050 ("Merge tag 'nf-26-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf")
    VM setup       https://bugs.sh/b/63bad23bb3b4cd85/run.sh
    config         https://bugs.sh/b/63bad23bb3b4cd85/config.gz
    poc            https://bugs.sh/b/63bad23bb3b4cd85/repro.c

== Sanitizer Report ====================================================
BUG: KASAN: slab-out-of-bounds in br_forward+0x3c2/0x420
Read of size 8 at addr ffff888023fc3938 by task exploit/5007
CPU: 0 UID: 1000 PID: 5007 Comm: exploit Not tainted 7.2.0-rc6-00285-g7b5344954050 #20 PREEMPT(full)
Call Trace:
 <IRQ>
 dump_stack_lvl+0x10e/0x1f0 (lib/dump_stack.c:123)
 print_report+0xf7/0x600 (mm/kasan/report.c:379)
 kasan_report+0xe4/0x120 (mm/kasan/report.c:597)
 br_forward+0x3c2/0x420 (net/bridge/br_forward.c:151 (discriminator 2))
 nft_reject_br_send_v4_unreach+0x9c/0x130 (net/bridge/netfilter/nft_reject_bridge.c:75)
 nft_reject_bridge_eval+0x4f0/0xcc0 (net/bridge/netfilter/nft_reject_bridge.c:129)
 nft_do_chain+0x2e5/0x19d0 (net/netfilter/nf_tables_core.c:287)
 nft_do_chain_bridge+0x199/0x290 (net/netfilter/nft_chain_filter.c:235)
 nf_hook_slow+0xbf/0x220 (net/netfilter/core.c:620)
 br_nf_hook_thresh+0x286/0x410 (net/bridge/br_netfilter_hooks.c:1164)
 br_nf_pre_routing_finish+0xb7c/0x1830 (net/bridge/br_netfilter_hooks.c:432)
 br_nf_pre_routing+0xfb6/0x1600 (./include/linux/netfilter.h:319)
 br_handle_frame+0xcbb/0x1520 (net/bridge/br_input.c:292)
 __netif_receive_skb_core.constprop.0+0x6bf/0x3610 (net/core/dev.c:6103 (discriminator 1))
 __netif_receive_skb_one_core+0xb0/0x1e0 (net/core/dev.c:6215)
 __netif_receive_skb+0x1f/0x120 (net/core/dev.c:6329)
 process_backlog+0x399/0x15b0 (./include/linux/rcupdate.h:869)
 __napi_poll.constprop.0+0xb3/0x550 (net/core/dev.c:7740)
 net_rx_action+0xa5e/0x1020 (net/core/dev.c:7804)
 handle_softirqs+0x1ea/0x9b0 (./arch/x86/include/asm/jump_label.h:37)
 do_softirq+0xad/0xe0 (kernel/softirq.c:523 (discriminator 20))
 </IRQ>
 __local_bh_enable_ip+0xfc/0x120 (kernel/softirq.c:450)
 __dev_queue_xmit+0xa2c/0x47f0 (net/core/dev.c:4914)
 packet_xmit+0x243/0x360 (./include/linux/netdevice.h:3448)
 packet_sendmsg+0x32fa/0x5010 (net/packet/af_packet.c:3109 (discriminator 1))
 __sys_sendto+0x480/0x4d0 (net/socket.c:775 (discriminator 1))
 __x64_sys_sendto+0xe0/0x1c0 (net/socket.c:2255)
 do_syscall_64+0x116/0x7d0 (arch/x86/entry/syscall_64.c:63 (discriminator 1))
The buggy address belongs to the object at ffff888023fc3920
 which belongs to the cache kmalloc-16 of size 16
The buggy address is located 8 bytes to the right of
 allocated 16-byte region [ffff888023fc3920, ffff888023fc3930)
Kernel panic - not syncing: KASAN: panic_on_warn set ...


---
The report format is based on syzbot bug report.

This report is generated by a bot. It may contain errors.
See https://github.com/n132/cedalion for more information.

For any issue with this report, reach out to cedalion@bugs.sh

If the report is already addressed, let us know by replying with:
#co fix: <commit hash>

If the report is a duplicate of another one, reply with:
#co dup: <lore link>

If you want to undo deduplication, reply with:
#co undup



             reply	other threads:[~2026-08-27 12:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 12:43 co [this message]
2026-08-27 14:29 ` [BUG] net/bridge: out-of-bounds in br_forward() Florian Westphal
2026-08-27 14:35   ` Nikolay Aleksandrov
2026-08-27 14:54   ` Pablo Neira Ayuso

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=fai12uKS5302YnCQV4E3zlDqcsAS5aGcMutS@bugs.sh \
    --to=co+63bad23bb3b4cd85@bugs.sh \
    --cc=bridge@lists.linux.dev \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=razor@blackwall.org \
    --cc=sd@queasysnail.net \
    /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