| 0/0 |
2026/08/10 00:47 |
flow |
assessment-security |
43m
Results: map[DenialOfService:true Explanation:Based on the analysis of the crash report and the kernel source code, here is
the assessment of the bug:
**Root Cause Analysis:**
The crash report indicates an RCU stall (`rcu_preempt detected stalls on
CPUs/tasks`) where the RCU grace-period kthread is starved for CPU time. The
stack traces show that the CPUs are overwhelmed by network packet processing.
Specifically, CPU 0 is stuck processing softirqs (`net_rx_action` ->
`br_handle_frame` -> `ip6_mc_input`), and another task is continuously
processing macvlan broadcast packets in a workqueue
(`macvlan_process_broadcast`).
The kernel logs also show a flood of warnings from the bridge subsystem:
`bridge0: received packet on bridge_slave_0 with own address as source address
(addr:aa:aa:aa:aa:aa:1b, vlan:0)`
This warning is printed by `br_fdb_update()` when a bridge receives a packet
that originated from its own MAC address. This is a classic symptom of a
**network loop** (e.g., connecting both ends of a `veth` pair to the same
bridge, or a loop involving `macvlan` interfaces).
Because Ethernet frames do not have a Time-To-Live (TTL) field, broadcast
packets in a loop will circulate endlessly and be duplicated, creating a
broadcast storm. The kernel spends all its CPU time in softirq and workqueue
contexts trying to process this infinite stream of packets, which starves normal
tasks and the RCU kthread, eventually triggering an RCU stall panic.
**Security Impact:**
* **Exploitable:** No. This is a resource exhaustion issue (CPU starvation).
There is no memory corruption, use-after-free, or information leak involved.
* **Denial Of Service:** Yes. The broadcast storm monopolizes the CPU, causing
an RCU stall which can lead to a kernel panic (if `panic_on_rcu_stall` is
enabled) or a complete system lockup.
* **Accessible From Unprivileged Processes:** No. Creating network interfaces
(like bridges, veth pairs, and macvlans) and altering their topology requires
`CAP_NET_ADMIN` privileges.
* **Accessible From User Namespaces:** Yes. An unprivileged user can create a
new user namespace and a new network namespace, gaining `CAP_NET_ADMIN` within
that namespace. They can then create the looped network topology to trigger the
broadcast storm and crash the host kernel.
* **Ethernet Network Trigger:** Yes. Once the looped topology is configured, any
ingress broadcast packet (e.g., ARP request, IPv6 multicast) will trigger the
storm.
* **VM Guest Trigger:** No. A typical KVM guest cannot create a tight loop in
the host's kernel networking stack (like a bridge-veth loop) unless the host is
already severely misconfigured to allow it. If a guest bridges two of its own
virtio-net interfaces, the packet loop will have to cross the guest/host
boundary (involving context switches and virtqueue processing), which is too
slow to cause a tight softirq storm that starves RCU in the host kernel. Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
|
| 1/1 |
2026/08/10 00:47 |
action |
syz-repro-to-c-repro |
0m
Results:
|
| 2/1 |
2026/08/10 00:47 |
action |
kernel-checkouter |
0m
Results: map[KernelSrc:/app/workdir/cache/src/372d345ff176cc24833eddc5c254ca2d46535c5e]
|
| 3/1 |
2026/08/10 00:47 |
action |
kernel-builder |
28m
Results: map[KernelObj:/app/workdir/cache/build/22bcc547c88329f9bd1c68d44fae69a6cf2b0d2e]
|
| 4/1 |
2026/08/10 01:16 |
action |
codesearch-prepare |
12m
Results: map[Index:codesearch-index]
|
| 5/1 |
2026/08/10 01:29 |
agent |
expert |
2m
Model:
Results: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
Instruction: You are an experienced Linux kernel security engineer. Your task is to analyze given kernel bug report
and determine its security impact based on the following dimensions.
Use the provided tools to examine the source code, check for capability checks (e.g., capable(), ns_capable()),
and understand the nature of the bug. Analyze the given kernel build and configuration.
You can check the kernel config by grepping ".config" file; you can check kernel cmdline by grepping
".config" file for "CONFIG_CMDLINE=". Assume sysctl parameters have default values.
But analyze for the corresponding production build w/o debugging tools enabled (like KASAN, KMSAN, UBSAN).
Try different strategies when analyzing the bug:
- think of ways in which the vulnerable code is unreachable
- or the other way around: try to come up with different ideas of how an unprivileged user can reach the bug
If still unsure err on the side of the bug being non-exploitable/not-accessible.
In the final reply, provide a reasoning for your assessment.
Analysis dimensions:
* Exploitable:
Determine if the bug can result in memory corruption, elevated privileges, or an information leak.
Memory safety issues are almost always exploitable (KASAN or UBSAN reports for use-after-free, out-of-bounds;
refcounting issues, corrupted lists, etc). When kernel is crashing on a completely wild pointer access
(e.g. user-space address, or non-canonical address, but not on NULL or address corresponding to KASAN shadow
for NULL address), including both data accesses and control transfers, that also usually implies possibility
of exploitation. Such reports usually say "unable to handle kernel paging request".
Uses of uninitialized values detected by KMSAN may be exploitable b/c attacker frequently can affect uninit
values with spraying techniques. However, for these exploitability depends on how exactly the uninit value
is used in the code, and what it affects.
Information leaks are exploitable on their own and should be classified as such. A bug that copies kernel
memory contents to userspace (e.g. an out-of-bounds read whose result is returned to the caller, or
uninitialized stack/heap bytes written to a user buffer) is exploitable: it can reveal kernel pointer
values and defeat KASLR, expose sensitive data such as cryptographic keys or other processes' memory, and
serves as a necessary building block in most modern kernel privilege-escalation exploit chains. Do not classify
an information leak as non-exploitable solely because it does not directly cause a memory write or control-flow
hijack; the leak itself is the exploit primitive.
Think of what happens after the bug is triggered. Some bugs cause kernel panic and halt execution,
they are harder to exploit. For example, BUG reports halts the kernel. However, WARNING reports don't halt
execution in production builds. Debug bug detection tools (like KASAN, KMSAN, KCSAN, UBSAN) are also not enabled
in production builds, so attacker can freely exploit these bugs w/o being detected by these tools.
If you see an integer overflow, think how the overflowed value used later (if it's used as allocation size,
or an array index). If you see an out-of-bounds read, think if it's followed by an out-of-bounds write as well.
Some KCSAN data-races may be exploitable by skilled attackers as well. Think what data structures got corrupted
as the result of data races and how. However, note that kernel has lots of "benign" data races that don't lead
to any runtime misbehavior at all.
* Denial Of Service:
Determine if the bug can result in denial-of-service. Most bugs can, since they cause system crash,
hangs, deadlocks, or resource leaks. This is mostly applicable to WARNING bugs that won't cause system crash
in production. For these think what will be consequences of the violation of the kernel assumptions flagged
by the WARNING. In some cases the unexpected condition is also properly handled by the normal control flow
(e.g. with "if (WARN_ON(...))"), these won't cause denial-of-service. If the condition is not handled,
then it may or may not cause denial-of-service.
* Accessible From Unprivileged Processes:
Determine if the bug can be reached from a typical (non-root) user process that does NOT have any special capabilities
(like CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON) or access to device nodes restricted to root.
Assume that unprivileged_bpf_disabled=1, that is eBPF loading is not accessible. However, cBPF (classical BPF)
is still accessible to non-root processes.
Assume that user namespaces are not accessible, that is, the process cannot get the mentioned capabilities even
within a new user namespace (checked by ns_capable() function in the kernel sources).
* Accessible From User Namespaces:
Determine if the bug can be reached within a user-namespace where the process has all capabilities
(including CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_NET_RAW, CAP_PERFMON). Such capabilities are checked with ns_capable()
function in the kernel sources.
* VM Guest Trigger:
Determine if the bug can be triggered from the context of a typical KVM guest (e.g., set up by a QEMU VMM).
Consider accesses to standard Linux host paravirtualized features (virtio-blk, virtio-net, etc.),
and handling of VM exits in the KVM code.
* VM Host Trigger in The Confidential Computing Context:
Determine if the bug can be triggered in a confidential computing guest kernel from the context of a KVM host.
Consider access to standard Linux guest paravirtualized features (virtio-blk, virtio-net, etc.).
* Ethernet Network Trigger:
Determine if the bug can be triggered by processing ingress network Ethernet traffic, either directly (network stack)
or via drivers exposed to network data.
* Other Remote Trigger:
Determine if the bug can be triggered by processing remote traffic other than Ethernet (Wifi, Bluetooth, NFC, etc).
* Peripheral Trigger:
Determine if the bug can be triggered via an untrusted peripheral device that can be physically plugged
into a system, such as a USB device or a niche hardware driver handling external hardware inputs.
This is particularly important for mobile and desktop environments where users can plug in unknown devices.
* Malicious Filesystem Trigger:
Determine if the bug can be triggered by the kernel mounting and parsing a malicious filesystem image.
This is highly critical for Desktop and Mobile environments where external media or downloaded images
might be auto-mounted.
Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt:
The kernel bug report is:
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P553/1:b..l P554/1:b..l P11536/1:b..l
rcu: (detected by 0, t=10502 jiffies, g=258089, q=780 ncpus=1)
task:kworker/u11:3 state:R running task stack:22456 pid:11536 tgid:11536 ppid:2 task_flags:0x4208160 flags:0x00080000
Workqueue: events_unbound macvlan_process_broadcast
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5510 [inline]
__schedule+0x125c/0x6730 kernel/sched/core.c:7234
preempt_schedule_irq+0x50/0x90 kernel/sched/core.c:7556
irqentry_exit_to_kernel_mode_preempt include/linux/irq-entry-common.h:468 [inline]
irqentry_exit_to_kernel_mode include/linux/irq-entry-common.h:539 [inline]
irqentry_exit+0x205/0xa00 kernel/entry/common.c:167
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:write_comp_data+0x40/0x90 kernel/kcov.c:246
Code: 59 12 a9 00 01 ff 00 74 1b f6 c4 01 74 07 a9 00 00 ff 00 74 05 e9 80 8a b1 09 8b 87 24 17 00 00 85 c0 74 f1 8b 87 f8 16 00 00 <83> f8 03 75 e6 48 8b 87 00 17 00 00 8b bf fc 16 00 00 48 8b 30 48
RSP: 0018:ffffc90006427a68 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff86cd6164
RDX: 00000000000000a2 RSI: 0000000000000100 RDI: ffff888030948000
RBP: dffffc0000000000 R08: 0000000000000005 R09: 0000000000000100
R10: 00000000000000a2 R11: 0000000000000000 R12: ffff888050198518
R13: ffff88807ef116c2 R14: 000000000000000f R15: 00000000000000a2
macvlan_broadcast+0x4a4/0x680 drivers/net/macvlan.c:279
macvlan_multicast_rx drivers/net/macvlan.c:304 [inline]
macvlan_multicast_rx+0xd8/0x100 drivers/net/macvlan.c:298
macvlan_process_broadcast+0x3e4/0x690 drivers/net/macvlan.c:344
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3486
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
task:syz.3.12157 state:R running task stack:27144 pid:554 tgid:554 ppid:5624 task_flags:0x40044c flags:0x00080002
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5510 [inline]
__schedule+0x125c/0x6730 kernel/sched/core.c:7234
preempt_schedule_common+0x42/0xc0 kernel/sched/core.c:7413
preempt_schedule_thunk+0x16/0x40 arch/x86/entry/thunk.S:12
__raw_spin_unlock include/linux/spinlock_api_smp.h:169 [inline]
_raw_spin_unlock+0x3e/0x50 kernel/locking/spinlock.c:190
spin_unlock include/linux/spinlock.h:390 [inline]
zap_pte_range mm/memory.c:1964 [inline]
zap_pmd_range mm/memory.c:2020 [inline]
zap_pud_range mm/memory.c:2048 [inline]
zap_p4d_range mm/memory.c:2069 [inline]
__zap_vma_range+0x16f5/0x4a40 mm/memory.c:2109
unmap_vmas+0x299/0x5f0 mm/memory.c:2178
exit_mmap+0x1ef/0xa00 mm/mmap.c:1300
__mmput+0x12a/0x410 kernel/fork.c:1187
mmput+0x67/0x80 kernel/fork.c:1210
exit_mm kernel/exit.c:615 [inline]
do_exit+0x8b1/0x2ae0 kernel/exit.c:997
do_group_exit+0xd5/0x2a0 kernel/exit.c:1152
get_signal+0x1ec7/0x21e0 kernel/signal.c:3046
arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0x139/0x6f0 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
do_syscall_64+0x652/0x840 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f8dc6f9eec9
RSP: 002b:00007fff01baab78 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
RAX: 0000000000001a90 RBX: 00007f8dc6f5a460 RCX: 00007f8dc6f9eec9
RDX: 00007f8dc6f5a460 RSI: 0000000000000058 RDI: 00007fff01baabd0
RBP: 00007f8dc7f3e6c0 R08: 00007f8dc7f3e6c0 R09: 00007fff01baacb7
R10: 0000000000000008 R11: 0000000000000206 R12: ffffffffffffffe8
R13: 000000000000000b R14: 00007fff01baabd0 R15: 00007fff01baacb8
</TASK>
task:syz.1.12156 state:R running task stack:27256 pid:553 tgid:551 ppid:5611 task_flags:0x40044c flags:0x00080002
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5510 [inline]
__schedule+0x125c/0x6730 kernel/sched/core.c:7234
preempt_schedule_common+0x42/0xc0 kernel/sched/core.c:7413
preempt_schedule_thunk+0x16/0x40 arch/x86/entry/thunk.S:12
__raw_spin_unlock include/linux/spinlock_api_smp.h:169 [inline]
_raw_spin_unlock+0x3e/0x50 kernel/locking/spinlock.c:190
spin_unlock include/linux/spinlock.h:390 [inline]
zap_pte_range mm/memory.c:1964 [inline]
zap_pmd_range mm/memory.c:2020 [inline]
zap_pud_range mm/memory.c:2048 [inline]
zap_p4d_range mm/memory.c:2069 [inline]
__zap_vma_range+0x16f5/0x4a40 mm/memory.c:2109
unmap_vmas+0x299/0x5f0 mm/memory.c:2178
exit_mmap+0x1ef/0xa00 mm/mmap.c:1300
__mmput+0x12a/0x410 kernel/fork.c:1187
mmput+0x67/0x80 kernel/fork.c:1210
exit_mm kernel/exit.c:615 [inline]
do_exit+0x8b1/0x2ae0 kernel/exit.c:997
do_group_exit+0xd5/0x2a0 kernel/exit.c:1152
get_signal+0x1ec7/0x21e0 kernel/signal.c:3046
arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:66 [inline]
exit_to_user_mode_loop+0x139/0x6f0 kernel/entry/common.c:101
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline]
do_syscall_64+0x652/0x840 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa43ff9e0d9
RSP: 002b:00007fa440f140e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: 0000000000000000 RBX: 00007fa440225fa8 RCX: 00007fa43ff9e0d9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fa440225fa8
RBP: 00007fa440225fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa440226038 R14: 00007ffd6657f190 R15: 00007ffd6657f278
</TASK>
rcu: rcu_preempt kthread starved for 535 jiffies! g258089 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:R running task stack:28984 pid:16 tgid:16 ppid:2 task_flags:0x208040 flags:0x00080000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5510 [inline]
__schedule+0x125c/0x6730 kernel/sched/core.c:7234
__schedule_loop kernel/sched/core.c:7311 [inline]
schedule+0xdd/0x2c0 kernel/sched/core.c:7326
schedule_timeout+0x127/0x280 kernel/time/sleep_timeout.c:99
rcu_gp_fqs_loop+0x1a9/0x900 kernel/rcu/tree.c:2123
rcu_gp_kthread+0x179/0x230 kernel/rcu/tree.c:2325
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 0 UID: 0 PID: 3219 Comm: kworker/R-bat_e Tainted: G U L syzkaller #0 PREEMPT(full)
Tainted: [U]=USER, [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Workqueue: bat_events batadv_dat_purge
RIP: 0010:lock_acquire+0x5e/0x370 kernel/locking/lockdep.c:5872
Code: 05 fb 62 7d 12 83 f8 07 0f 87 da 00 00 00 48 0f a3 05 86 4b 3c 0f 0f 82 ac 02 00 00 8b 35 2e 7f 3c 0f 85 f6 0f 85 c7 00 00 00 <48> 8b 44 24 30 65 48 2b 05 9d 62 7d 12 0f 85 ec 02 00 00 48 83 c4
RSP: 0018:ffffc90000006a40 EFLAGS: 00000206
RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e17c87c RDI: ffffffff8c3fe580
RBP: ffffffff8ebe8000 R08: 0000000039529a68 R09: 0000000000000007
R10: 0000000000000200 R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff888123df3000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f34ec400218 CR3: 000000007f962000 CR4: 00000000003526f0
Call Trace:
<IRQ>
rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
rcu_read_lock include/linux/rcupdate.h:840 [inline]
class_rcu_constructor include/linux/rcupdate.h:1183 [inline]
unwind_next_frame+0xd1/0x2090 arch/x86/kernel/unwind_orc.c:495
arch_stack_walk+0x94/0xf0 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2677 [inline]
slab_free mm/slub.c:6377 [inline]
kmem_cache_free+0x127/0x6b0 mm/slub.c:6504
__skb_ext_put+0x102/0x2f0 net/core/skbuff.c:7278
skb_ext_reset include/linux/skbuff.h:5117 [inline]
skb_ext_reset include/linux/skbuff.h:5114 [inline]
skb_release_head_state+0x2c8/0x400 net/core/skbuff.c:1189
skb_release_all net/core/skbuff.c:1195 [inline]
__kfree_skb net/core/skbuff.c:1211 [inline]
sk_skb_reason_drop+0xc4/0x1b0 net/core/skbuff.c:1250
kfree_skb_reason include/linux/skbuff.h:1323 [inline]
kfree_skb include/linux/skbuff.h:1332 [inline]
ip6_mc_input+0x832/0xf50 net/ipv6/ip6_input.c:638
dst_input include/net/dst.h:480 [inline]
ip6_rcv_finish+0x294/0x300 net/ipv6/ip6_input.c:119
ip_sabotage_in+0x21e/0x290 net/bridge/br_netfilter_hooks.c:988
nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline]
nf_hook_slow+0xbf/0x220 net/netfilter/core.c:619
nf_hook.constprop.0+0x2a6/0x750 include/linux/netfilter.h:273
NF_HOOK include/linux/netfilter.h:316 [inline]
ipv6_rcv+0xa4/0x3d0 net/ipv6/ip6_input.c:351
__netif_receive_skb_one_core+0x12d/0x1e0 net/core/dev.c:6212
__netif_receive_skb+0x1f/0x120 net/core/dev.c:6325
netif_receive_skb_internal net/core/dev.c:6411 [inline]
netif_receive_skb+0x139/0x7d0 net/core/dev.c:6470
NF_HOOK include/linux/netfilter.h:318 [inline]
NF_HOOK include/linux/netfilter.h:312 [inline]
br_pass_frame_up+0x346/0x490 net/bridge/br_input.c:70
br_handle_frame_finish+0xa94/0x1fa0 net/bridge/br_input.c:235
br_nf_hook_thresh+0x30d/0x420 net/bridge/br_netfilter_hooks.c:1165
br_nf_pre_routing_finish_ipv6+0x659/0xdd0 net/bridge/br_netfilter_ipv6.c:153
NF_HOOK include/linux/netfilter.h:318 [inline]
br_nf_pre_routing_ipv6+0x39c/0x8b0 net/bridge/br_netfilter_ipv6.c:183
br_nf_pre_routing+0x90f/0x1560 net/bridge/br_netfilter_hooks.c:513
nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline]
nf_hook_bridge_pre net/bridge/br_input.c:291 [inline]
br_handle_frame+0xce9/0x1540 net/bridge/br_input.c:442
__netif_receive_skb_core.constprop.0+0x6c5/0x3530 net/core/dev.c:6099
__netif_receive_skb_one_core+0xb0/0x1e0 net/core/dev.c:6210
__netif_receive_skb+0x1f/0x120 net/core/dev.c:6325
process_backlog+0x37a/0x1580 net/core/dev.c:6676
__napi_poll.constprop.0+0xaf/0x450 net/core/dev.c:7735
napi_poll net/core/dev.c:7798 [inline]
net_rx_action+0xa40/0xf20 net/core/dev.c:7955
handle_softirqs+0x1ea/0x9b0 kernel/softirq.c:622
do_softirq kernel/softirq.c:523 [inline]
do_softirq+0xac/0xe0 kernel/softirq.c:510
</IRQ>
<TASK>
__local_bh_enable_ip+0xf8/0x120 kernel/softirq.c:450
spin_unlock_bh include/linux/spinlock.h:396 [inline]
__batadv_dat_purge.part.0+0x294/0x3c0 net/batman-adv/distributed-arp-table.c:186
__batadv_dat_purge net/batman-adv/distributed-arp-table.c:167 [inline]
batadv_dat_purge+0x4b/0xa0 net/batman-adv/distributed-arp-table.c:205
process_one_work+0xa23/0x1940 kernel/workqueue.c:3322
process_scheduled_works kernel/workqueue.c:3405 [inline]
rescuer_thread+0x905/0x14a0 kernel/workqueue.c:3629
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
net_ratelimit: 2635 callbacks suppressed
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
net_ratelimit: 4461 callbacks suppressed
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)
Reply: Based on the analysis of the crash report and the kernel source code, here is the assessment of the bug:
**Root Cause Analysis:**
The crash report indicates an RCU stall (`rcu_preempt detected stalls on CPUs/tasks`) where the RCU grace-period kthread is starved for CPU time. The stack traces show that the CPUs are overwhelmed by network packet processing. Specifically, CPU 0 is stuck processing softirqs (`net_rx_action` -> `br_handle_frame` -> `ip6_mc_input`), and another task is continuously processing macvlan broadcast packets in a workqueue (`macvlan_process_broadcast`).
The kernel logs also show a flood of warnings from the bridge subsystem:
`bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)`
This warning is printed by `br_fdb_update()` when a bridge receives a packet that originated from its own MAC address. This is a classic symptom of a **network loop** (e.g., connecting both ends of a `veth` pair to the same bridge, or a loop involving `macvlan` interfaces).
Because Ethernet frames do not have a Time-To-Live (TTL) field, broadcast packets in a loop will circulate endlessly and be duplicated, creating a broadcast storm. The kernel spends all its CPU time in softirq and workqueue contexts trying to process this infinite stream of packets, which starves normal tasks and the RCU kthread, eventually triggering an RCU stall panic.
**Security Impact:**
* **Exploitable:** No. This is a resource exhaustion issue (CPU starvation). There is no memory corruption, use-after-free, or information leak involved.
* **Denial Of Service:** Yes. The broadcast storm monopolizes the CPU, causing an RCU stall which can lead to a kernel panic (if `panic_on_rcu_stall` is enabled) or a complete system lockup.
* **Accessible From Unprivileged Processes:** No. Creating network interfaces (like bridges, veth pairs, and macvlans) and altering their topology requires `CAP_NET_ADMIN` privileges.
* **Accessible From User Namespaces:** Yes. An unprivileged user can create a new user namespace and a new network namespace, gaining `CAP_NET_ADMIN` within that namespace. They can then create the looped network topology to trigger the broadcast storm and crash the host kernel.
* **Ethernet Network Trigger:** Yes. Once the looped topology is configured, any ingress broadcast packet (e.g., ARP request, IPv6 multicast) will trigger the storm.
* **VM Guest Trigger:** No. A typical KVM guest cannot create a tight loop in the host's kernel networking stack (like a bridge-veth loop) unless the host is already severely misconfigured to allow it. If a guest bridges two of its own virtio-net interfaces, the packet loop will have to cross the guest/host boundary (involving context switches and virtqueue processing), which is too slow to cause a tight softirq storm that starves RCU in the host kernel.
|
| 6/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 13498
output: 40
thoughts: 1877
Thoughts: **RCU Stall Investigation: Packet Storm Implication**
Okay, so I've got an RCU stall report here. The report points to tasks being blocked at level-0 `rcu_node`. My initial thought is to dive into the callstacks of these blocked tasks to understand the holdup. I've got three tasks flagged: P553, P554, and P11536.
Looking at the stacks, tasks P553 and P554 are in `exit_mmap`, which leads down the path to `__schedule`, suggesting memory management and possibly context switching are involved. Then there's this `macvlan_process_broadcast` function that's running in task P11536. It looks to be a workqueue task.
The RCU GP kthread, the one doing the grace period work, supposedly last ran in `batadv_dat_purge`. But wait a minute, the stack dump shows that it was actually a process on CPU 0 that was running that function, which is now executing `batadv_dat_purge` β which is interrupted by a softirq!
Now things are starting to click. I'm seeing network activity in the softirq stack: `ip6_mc_input`, `br_handle_frame`, and all these netfilter hooks. I am seeing `bridge0: received packet on bridge_slave_0 with own address as source address` messages. Bingo! I'm suspecting a network loop, a packet storm that's clogging up the works. The `macvlan_process_broadcast` task is involved, so perhaps this is a problem in the macvlan setup. I need to get into `drivers/net/macvlan.c` to see how it processes this broadcast traffic. The packets being received in `net_rx_action` further support the idea of a loop consuming resources. This loop is the RCU stall.
|
| 7/2 |
2026/08/10 01:29 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/macvlan.c Name:macvlan_process_broadcast]
Results: map[SourceCode: 327: static void macvlan_process_broadcast(struct work_struct *w)
328: {
329: struct macvlan_port *port = container_of(w, struct macvlan_port,
330: bc_work);
331: struct sk_buff *skb;
332: struct sk_buff_head list;
333:
334: __skb_queue_head_init(&list);
335:
336: spin_lock_bh(&port->bc_queue.lock);
337: skb_queue_splice_tail_init(&port->bc_queue, &list);
338: spin_unlock_bh(&port->bc_queue.lock);
339:
340: while ((skb = __skb_dequeue(&list))) {
341: const struct macvlan_dev *src = MACVLAN_SKB_CB(skb)->src;
342:
343: rcu_read_lock();
344: macvlan_multicast_rx(port, src, skb);
345: rcu_read_unlock();
346:
347: if (src)
348: dev_put(src->dev);
349: consume_skb(skb);
350:
351: cond_resched();
352: }
353: }
SourceFile:drivers/net/macvlan.c]
|
| 8/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 16272
output: 38
thoughts: 539
Thoughts: **Analyzing a Network Broadcast Storm**
Okay, so I'm looking at this trace and immediately see that `macvlan_process_broadcast` has a `cond_resched()` call. But if the packet flood is really intense, I'm wondering if `cond_resched()` is enough, especially if it's running in a context where it's not actually yielding, or if the softirqs are constantly interrupting it. Wait, `cond_resched()` *does* yield if `TIF_NEED_RESCHED` is set, so it should be okay.
Then I see the RCU stall is on CPUs 0-1. Task 11536 is stuck in `macvlan_process_broadcast`, and tasks 553 and 554 are in `unmap_vmas`. And the RCU GP kthread has been starved for a good chunk of time β 535 jiffies! It last ran on CPU 0, which is running `batadv_dat_purge` and getting interrupted by `do_softirq`. This softirq is processing packets from `process_backlog` all the way down through various netfilter and IPv6 layers.
The bridge is throwing up an error: "received packet on bridge_slave_0 with own address as source address." That's classic β the bridge is getting a packet back that it already sent out, indicating a network loop. That loop is almost certainly causing this broadcast storm.
Now, is this a kernel bug, or just a really unfortunate consequence of a network loop? Network loops are, generally speaking, configuration errors. But ideally, the kernel should *not* completely lock up. Without STP (Spanning Tree Protocol) enabled, the bridge is just going to loop the packets forever, creating a storm.
If it *is* a broadcast storm, `process_backlog` will keep processing packets. `net_rx_action` is supposed to limit softirq time, but if the storm is bad enough, it might just keep re-triggering softirqs, even within that limit.
Let me zero in on that bridge message: `"bridge0: received packet on bridge_slave_0 with own address as source address (addr:aa:aa:aa:aa:aa:1b, vlan:0)"` That's printed in `br_handle_frame`, which helps pinpoint where this is coming from.
|
| 9/2 |
2026/08/10 01:29 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/bridge/br_input.c Name:br_handle_frame]
Results: map[SourceCode: 335: /*
336: * Return NULL if skb is handled
337: * note: already called with rcu_read_lock
338: */
339: static rx_handler_result_t br_handle_frame(struct sk_buff **pskb)
340: {
341: enum skb_drop_reason reason = SKB_DROP_REASON_NOT_SPECIFIED;
342: struct net_bridge_port *p;
343: struct sk_buff *skb = *pskb;
344: const unsigned char *dest = eth_hdr(skb)->h_dest;
345:
346: if (unlikely(skb->pkt_type == PACKET_LOOPBACK))
347: return RX_HANDLER_PASS;
348:
349: if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) {
350: reason = SKB_DROP_REASON_MAC_INVALID_SOURCE;
351: goto drop;
352: }
353:
354: skb = skb_share_check(skb, GFP_ATOMIC);
355: if (!skb)
356: return RX_HANDLER_CONSUMED;
357:
358: memset(skb->cb, 0, sizeof(struct br_input_skb_cb));
359: br_tc_skb_miss_set(skb, false);
360:
361: p = br_port_get_rcu(skb->dev);
362: if (test_bit(BR_VLAN_TUNNEL_BIT, &p->flags))
363: br_handle_ingress_vlan_tunnel(skb, p, nbp_vlan_group_rcu(p));
364:
365: if (unlikely(is_link_local_ether_addr(dest))) {
366: u16 fwd_mask = p->br->group_fwd_mask_required;
367:
368: /*
369: * See IEEE 802.1D Table 7-10 Reserved addresses
370: *
371: * Assignment Value
372: * Bridge Group Address 01-80-C2-00-00-00
373: * (MAC Control) 802.3 01-80-C2-00-00-01
374: * (Link Aggregation) 802.3 01-80-C2-00-00-02
375: * 802.1X PAE address 01-80-C2-00-00-03
376: *
377: * 802.1AB LLDP 01-80-C2-00-00-0E
378: *
379: * Others reserved for future standardization
380: */
381: fwd_mask |= p->group_fwd_mask;
382: switch (dest[5]) {
383: case 0x00: /* Bridge Group Address */
384: /* If STP is turned off,
385: then must forward to keep loop detection */
386: if (p->br->stp_enabled == BR_NO_STP ||
387: fwd_mask & (1u << dest[5]))
388: goto forward;
389: *pskb = skb;
390: __br_handle_local_finish(skb);
391: return RX_HANDLER_PASS;
392:
393: case 0x01: /* IEEE MAC (Pause) */
394: reason = SKB_DROP_REASON_MAC_IEEE_MAC_CONTROL;
395: goto drop;
396:
397: case 0x0E: /* 802.1AB LLDP */
398: fwd_mask |= p->br->group_fwd_mask;
399: if (fwd_mask & (1u << dest[5]))
400: goto forward;
401: *pskb = skb;
402: __br_handle_local_finish(skb);
403: return RX_HANDLER_PASS;
404:
405: default:
406: /* Allow selective forwarding for most other protocols */
407: fwd_mask |= p->br->group_fwd_mask;
408: if (fwd_mask & (1u << dest[5]))
409: goto forward;
410: }
411:
412: BR_INPUT_SKB_CB(skb)->promisc = false;
413:
414: /* The else clause should be hit when nf_hook():
415: * - returns < 0 (drop/error)
416: * - returns = 0 (stolen/nf_queue)
417: * Thus return 1 from the okfn() to signal the skb is ok to pass
418: */
419: if (NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN,
420: dev_net(skb->dev), NULL, skb, skb->dev, NULL,
421: br_handle_local_finish) == 1) {
422: return RX_HANDLER_PASS;
423: } else {
424: return RX_HANDLER_CONSUMED;
425: }
426: }
427:
428: if (unlikely(br_process_frame_type(p, skb)))
429: return RX_HANDLER_PASS;
430:
431: forward:
432: if (br_mst_is_enabled(p))
433: goto defer_stp_filtering;
434:
435: switch (p->state) {
436: case BR_STATE_FORWARDING:
437: case BR_STATE_LEARNING:
438: defer_stp_filtering:
439: if (ether_addr_equal(p->br->dev->dev_addr, dest))
440: skb->pkt_type = PACKET_HOST;
441:
442: return nf_hook_bridge_pre(skb, pskb);
443: default:
444: reason = SKB_DROP_REASON_BRIDGE_INGRESS_STP_STATE;
445: drop:
446: kfree_skb_reason(skb, reason);
447: }
448: return RX_HANDLER_CONSUMED;
449: }
SourceFile:net/bridge/br_input.c]
|
| 10/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 19319
output: 24
thoughts: 34
Thoughts: Okay, let's see...
**Debugging a Network Anomaly**
Hold on, I need to figure out where this message is even being printed. It seems like something isn't right. I'm seeing "received packet on bridge_slave_0 with own address as source address". That's definitely unusual. It sounds like a loop or a misconfiguration on the network. Okay, time to start digging. The first thing I'll do is search the code base for that exact string. That should give me a good starting point to understand the context and narrow down the root cause of this aberrant behavior. I want to see where that message is generated and why. Let's get to work.
|
| 11/2 |
2026/08/10 01:29 |
tool |
grepper |
0m
Args: map[Expression:received packet on.*with own address as source address]
Results: map[Output:net/bridge/br_fdb.c=973=void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
--
net/bridge/br_fdb.c-986- if (net_ratelimit())
net/bridge/br_fdb.c:987: br_warn(br, "received packet on %s with own address as source address (addr:%pM, vlan:%u)\n",
net/bridge/br_fdb.c-988- source->dev->name, addr, vid);
]
|
| 12/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 19678
output: 40
thoughts: 13
Thoughts: Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to an expert:
**Debugging This `br_fdb_update` Output**
Okay, so I'm staring at this output, and the first thing that jumps out is that it's coming from `br_fdb_update`. That narrows down the source considerably. This is a crucial function in the bridge's forwarding database, so this is where I need to start my analysis.
|
| 13/2 |
2026/08/10 01:29 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/bridge/br_fdb.c Name:br_fdb_update]
Results: map[SourceCode: 973: void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
974: const unsigned char *addr, u16 vid, unsigned long flags)
975: {
976: struct net_bridge_fdb_entry *fdb;
977:
978: /* some users want to always flood. */
979: if (hold_time(br) == 0)
980: return;
981:
982: fdb = fdb_find_rcu(&br->fdb_hash_tbl, addr, vid);
983: if (likely(fdb)) {
984: /* attempt to update an entry for a local interface */
985: if (unlikely(test_bit(BR_FDB_LOCAL, &fdb->flags))) {
986: if (net_ratelimit())
987: br_warn(br, "received packet on %s with own address as source address (addr:%pM, vlan:%u)\n",
988: source->dev->name, addr, vid);
989: } else {
990: unsigned long now = jiffies;
991: bool fdb_modified = false;
992:
993: if (now != READ_ONCE(fdb->updated)) {
994: WRITE_ONCE(fdb->updated, now);
995: fdb_modified = __fdb_mark_active(fdb);
996: }
997:
998: /* fastpath: update of existing entry */
999: if (unlikely(source != READ_ONCE(fdb->dst) &&
1000: !test_bit(BR_FDB_STICKY, &fdb->flags))) {
1001: br_switchdev_fdb_notify(br, fdb, RTM_DELNEIGH);
1002: WRITE_ONCE(fdb->dst, source);
1003: fdb_modified = true;
1004: /* Take over HW learned entry */
1005: if (unlikely(test_bit(BR_FDB_ADDED_BY_EXT_LEARN,
1006: &fdb->flags)))
1007: clear_bit(BR_FDB_ADDED_BY_EXT_LEARN,
1008: &fdb->flags);
1009: /* Clear locked flag when roaming to an
1010: * unlocked port.
1011: */
1012: if (unlikely(test_bit(BR_FDB_LOCKED, &fdb->flags)))
1013: clear_bit(BR_FDB_LOCKED, &fdb->flags);
1014: }
1015:
1016: if (unlikely(test_bit(BR_FDB_ADDED_BY_USER, &flags))) {
1017: set_bit(BR_FDB_ADDED_BY_USER, &fdb->flags);
1018: if (test_and_clear_bit(BR_FDB_DYNAMIC_LEARNED,
1019: &fdb->flags))
1020: atomic_dec(&br->fdb_n_learned);
1021: }
1022: if (unlikely(fdb_modified)) {
1023: trace_br_fdb_update(br, source, addr, vid, flags);
1024: fdb_notify(br, fdb, RTM_NEWNEIGH, true);
1025: }
1026: }
1027: } else {
1028: spin_lock(&br->hash_lock);
1029: fdb = fdb_create(br, source, addr, vid, flags);
1030: if (fdb) {
1031: trace_br_fdb_update(br, source, addr, vid, flags);
1032: fdb_notify(br, fdb, RTM_NEWNEIGH, true);
1033: }
1034: /* else we lose race and someone else inserts
1035: * it first, don't bother updating
1036: */
1037: spin_unlock(&br->hash_lock);
1038: }
1039: }
SourceFile:net/bridge/br_fdb.c]
|
| 14/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 21043
output: 21
thoughts: 1057
Thoughts: **Analyzing a Kernel Network Loop Vulnerability**
Okay, so I'm looking at `br_fdb_update` and how it handles packets. The code warns if a packet's source MAC matches a local one. That's a clear indicator of a packet looping back to itself β a classic network loop. This implies the bridge is sending a packet it later receives.
Network loops are bad news. They generate broadcast storms, consuming CPU resources and potentially leading to an RCU stall or softlockup. Is this just the expected behavior, or is there a kernel bug here? Network loops are generally an external or configuration problem, like misconfigured spanning tree protocol (STP) or accidentally connecting bridge ports together. However, syzkaller's ability to trigger this through crafted network interface configurations is interesting. It can easily create these scenarios by adding interfaces like veth pairs or macvlans to a bridge, where the macvlan's lower device is already a bridge member.
The problem, as I see it, is that once a loop starts, packets get endlessly forwarded. Ethernet frames don't have TTL. So, a broadcast frame will just circulate forever (or multiply exponentially in a broadcast storm). This single circulating frame can monopolize a CPU core. Since bridging happens in softirq, it can lead to RCU stalls because the softirq can use 100% of the CPU. The kernel's `net_rx_action` is supposed to limit softirq processing with budget and time limits, scheduling `ksoftirqd` or returning to the interrupted context, but if the softirq is constantly re-raised, the CPU might spend all its time in softirq and `ksoftirqd`, starving other tasks. But, `ksoftirqd` is a normal thread (SCHED_OTHER), so it should compete with other threads and doesn't explain the RCU stalls. Also, `macvlan_process_broadcast` is executed in a workqueue, but even with `cond_resched()`, the system might be overwhelmed, starving the RCU grace period kthread.
In the stall report, `macvlan_process_broadcast` is running on a worker thread. Tasks in `unmap_vmas` are being starved. The RCU grace period kthread, the one that handles garbage collection and quiescent state, last ran on CPU 0 while executing `batadv_dat_purge`, then it was interrupted by a softirq that was processing packets. The kthread is waiting for CPU quiescent states, but the softirq is constantly running, meaning that the CPU isn't able to achieve a state of quiescence where the grace period kthread can advance.
So, is this a security vulnerability? A local user with `CAP_NET_ADMIN` (within a user namespace) *can* create this loop. That's a real denial-of-service risk, especially with `panic_on_rcu_stall` set. Itβs a well-known risk with network namespaces and bridges. But is there a *specific* bug here, or is it just the generic "network loop causes DoS" issue? I need to check if there are any fixes for this specific stack trace or related issues.
|
| 15/2 |
2026/08/10 01:29 |
tool |
grepper |
0m
Args: map[Expression:macvlan_process_broadcast]
Results: map[Output:drivers/net/macvlan.c=298=static void macvlan_multicast_rx(const struct macvlan_port *port,
--
drivers/net/macvlan.c-326-
drivers/net/macvlan.c:327:static void macvlan_process_broadcast(struct work_struct *w)
drivers/net/macvlan.c-328-{
--
drivers/net/macvlan.c=1248=static int macvlan_port_create(struct net_device *dev)
--
drivers/net/macvlan.c-1274- skb_queue_head_init(&port->bc_queue);
drivers/net/macvlan.c:1275: INIT_WORK(&port->bc_work, macvlan_process_broadcast);
drivers/net/macvlan.c-1276-
]
|
| 16/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 23041
output: 28
thoughts: 17
Thoughts: Here's my thought process, summarized as you requested:
**Investigating the `macvlan_process_broadcast` Function**
Okay, time to dive in. My immediate thought is, "Let's see what's been happening with that `macvlan_process_broadcast` function." I need to understand its recent history, any modifications, and who's been touching it. The most direct and efficient way to do that is to hit the `git log`. I'm hoping the commit messages will give me context, any bug fixes, performance improvements, or potential regressions related to this function. Maybe I'll find a clue about a recent change that's impacting the system. The `git log` should provide a good overview of the relevant activity. I'll need to know the most recent changes to this functionality.
|
| 17/2 |
2026/08/10 01:29 |
tool |
git-log |
0m
Error:
Args: map[Count:10 SymbolName:macvlan_process_broadcast]
Results:
|
| 18/2 |
2026/08/10 01:29 |
llm |
expert |
0m
Model:
Tokens:
input: 23283
output: 43
thoughts: 10
Thoughts: Okay, here's the summary, assuming I'm thinking about the process:
**My Immediate Need: Defining the Source**
Right, so the system is prompting me, and it's crystal clear what the first thing I need to address is. It's asking for a `SourcePath`. In this context, I know exactly what that means: I have to define *where* the relevant data is located. Without knowing the source, there's no way the system can proceed. I need to explicitly provide that input. The precision here is important; the system is explicitly requesting this piece of information, and it's a fundamental requirement.
|
| 19/2 |
2026/08/10 01:29 |
tool |
git-log |
0m
Args: map[Count:10 SourcePath:drivers/net/macvlan.c SymbolName:macvlan_process_broadcast]
Results: map[Output:d45276e75e90 macvlan: Skip broadcast queue if multicast with single receiver
ce9a4186f9ac macvlan: add cond_resched() during multicast processing
bf97403ac4bf macvlan: replace kfree_skb by consume_skb for drop profiles
260916dfb48c macvlan: Fix potential use-after free for broadcasts
fe0ca7328d03 macvlan: fix a race on port dismantle and possible skb leaks
412ca1550cbe macvlan: Move broadcasts into a work queue
4ec7ac1203bc macvlan: fix a possible use after free
729e72a10930 macvlan: receive multicast with local address
bc416d9768aa macvlan: handle fragmented multicast frames
8a4eb5734e8d net: introduce rx_handler results and logic around that
]
|
| 20/2 |
2026/08/10 01:30 |
llm |
expert |
0m
Model:
Tokens:
input: 23716
output: 25
thoughts: 29
Thoughts: Here's my take on those thoughts, tailored for an expert audience:
**Analyzing the Macvlan Multicast Processing Patch**
Okay, so the first thing on my mind is to dig into the implications of `ce9a4186f9ac`. Specifically, the addition of `cond_resched()` within the Macvlan multicast processing path. I'm immediately thinking about the context of multicast, and how heavy that can be on a system, especially with high rates of traffic or in scenarios with a lot of active multicast groups.
My immediate question is *where* precisely did they stick `cond_resched()`? Is it in a tight loop within the NAPI context? Is it within the interrupt handler? Or is it perhaps related to a workqueue item? I need to understand the potential interrupt latency impacts because Macvlan can be fairly sensitive to scheduling delays, especially if it's acting as the primary point of multicast processing.
I'm wondering about the rationale behind the addition. Did profiling show high latencies or lock contention in certain multicast scenarios? Is this to prevent a single macvlan instance from monopolizing the CPU when handling a multicast stream? My initial thought is that this is likely a good optimization to avoid starvation in congested conditions.
More importantly, how intrusive is this addition? Is there a risk of introducing any performance regressions in *unicast* traffic due to unnecessary context switches? Or is this done carefully? I would expect they have tested this carefully.
I need to understand the exact trade-off being made. I assume theyβre trading some throughput for lower latency in some, but not all scenarios. The question I'm trying to ask is, how does this affect our real world application?
|
| 21/2 |
2026/08/10 01:30 |
tool |
git-show |
0m
Args:
Results: map[Output:commit ce9a4186f9ac475c415ffd20348176a4ea366670
Author: Mahesh Bandewar <maheshb@google.com>
Date: Mon Mar 9 15:57:07 2020 -0700
macvlan: add cond_resched() during multicast processing
The Rx bound multicast packets are deferred to a workqueue and
macvlan can also suffer from the same attack that was discovered
by Syzbot for IPvlan. This solution is not as effective as in
IPvlan. IPvlan defers all (Tx and Rx) multicast packet processing
to a workqueue while macvlan does this way only for the Rx. This
fix should address the Rx codition to certain extent.
Tx is still suseptible. Tx multicast processing happens when
.ndo_start_xmit is called, hence we cannot add cond_resched().
However, it's not that severe since the user which is generating
/ flooding will be affected the most.
Fixes: 412ca1550cbe ("macvlan: Move broadcasts into a work queue")
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 81aa7adf4801..e7289d67268f 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -334,6 +334,8 @@ static void macvlan_process_broadcast(struct work_struct *w)
if (src)
dev_put(src->dev);
consume_skb(skb);
+
+ cond_resched();
}
}
]
|
| 22/2 |
2026/08/10 01:30 |
llm |
expert |
0m
Model:
Tokens:
input: 24644
output: 38
thoughts: 1961
Thoughts: **Root Cause Analysis of RCU Stall in Network Bridge Scenario**
Okay, let's break this down. We have an RCU stall, which is a significant problem. Initially, the assumption was that the addition of `cond_resched()` to `macvlan_process_broadcast` would prevent CPU hogging, but clearly, that's not the case. The RCU stall, as identified on CPUs 0-1, points to a specific issue: tasks are blocked within an RCU read-side critical section. Specifically, tasks P553, P554 and P11536 are blocked on level-0 rcu_node. This is concerning.
The culprit seems to be `macvlan_process_broadcast`, which utilizes `rcu_read_lock()` and `rcu_read_unlock()`. Inside that critical section, it calls `macvlan_multicast_rx`. While `macvlan_multicast_rx` *shouldn't* block, the fact that these tasks are marked as 'b..l' (blocked, listed) is a major clue. Given that `macvlan_process_broadcast` is preemptible because it's in a workqueue, this means it's getting preempted while holding the RCU read lock. With `PREEMPT(full)` enabled, preemption within RCU read-side sections is possible, but it results in a blockage of the RCU grace period until the task resumes and releases the lock.
So the million dollar question is, why are these tasks *not* resuming? The key is the RCU GP kthread being starved. The RCU grace period kthread has been starved for 535 jiffies. Furthermore, CPU 0 is bogged down in softirq processing. Digging into the stack trace, we see a constant stream of packets hitting `__netif_receive_skb` ultimately culminating in `kmem_cache_free`. This is likely a broadcast storm. The network driver is constantly receiving packets and triggering interrupts, consuming CPU time. If there's a constant stream of packets, `net_rx_action` is keeping the CPU busy, starving the normal tasks, including the RCU GP kthread and the tasks that are preempted inside RCU read-side critical sections. This explains why the RCU stall occurs. The RCU grace period can't complete because the CPU is constantly busy.
So the root cause is a broadcast storm, creating a softirq storm, leading to CPU starvation. This is a denial of service issue. Is this a bug? Yes, it's a known issue that network loops lead to softlockups or RCU stalls. Can an unprivileged user trigger this? Yes, provided they have `CAP_NET_ADMIN` in a user namespace. Is it exploitable? No, no memory corruption or information leak. It's simply a CPU starvation issue.
I wanted to dig a bit deeper into some of the context. Let's see if there are any other bug. The KCOV instrumentation in the `macvlan_process_broadcast` is not interesting. And the stack traces of the other tasks in `unmap_vmas` are exiting and unmapping memory. Does that point to some sort of race condition or RCU locking issue? No, `zap_pte_range` should not be holding any RCU locks. I checked. The fact that `spin_unlock` in `zap_pte_range` can enable preemption while the tasks are blocked on the RCU node suggests they might have been preempted while in an RCU critical section somehow. But I don't see how that can happen.
It's clear that the main problem is the RCU GP kthread starvation. The bridge complains about receiving packets with its own address, indicating a broadcast loop. This confirms that a network loop is the trigger. Syzkaller can easily create a broadcast storm by setting up a bridge and adding both ends of a veth pair to it. The bridge will then forward broadcasts into each veth interface, and the loop is created because the interfaces are linked to each other.
The bottom line is the root cause is clear. A network loop is causing a broadcast storm and softirq storm, starving the CPU and leading to an RCU stall.
|
| 23/2 |
2026/08/10 01:30 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:net/bridge/br_if.c Name:br_add_if]
Results: map[SourceCode: 559: /* called with RTNL */
560: int br_add_if(struct net_bridge *br, struct net_device *dev,
561: struct netlink_ext_ack *extack)
562: {
563: struct net_bridge_port *p;
564: int err = 0;
565: unsigned br_hr, dev_hr;
566: bool changed_addr, fdb_synced = false;
567:
568: /* Don't allow bridging non-ethernet like devices. */
569: if ((dev->flags & IFF_LOOPBACK) ||
570: dev->type != ARPHRD_ETHER || dev->addr_len != ETH_ALEN ||
571: !is_valid_ether_addr(dev->dev_addr))
572: return -EINVAL;
573:
574: /* No bridging of bridges */
575: if (dev->netdev_ops->ndo_start_xmit == br_dev_xmit) {
576: NL_SET_ERR_MSG(extack,
577: "Can not enslave a bridge to a bridge");
578: return -ELOOP;
579: }
580:
581: /* Device has master upper dev */
582: if (netdev_master_upper_dev_get(dev))
583: return -EBUSY;
584:
585: /* No bridging devices that dislike that (e.g. wireless) */
586: if (dev->priv_flags & IFF_DONT_BRIDGE) {
587: NL_SET_ERR_MSG(extack,
588: "Device does not allow enslaving to a bridge");
589: return -EOPNOTSUPP;
590: }
591:
592: p = new_nbp(br, dev);
593: if (IS_ERR(p))
594: return PTR_ERR(p);
595:
596: call_netdevice_notifiers(NETDEV_JOIN, dev);
597:
598: err = dev_set_allmulti(dev, 1);
599: if (err) {
600: br_multicast_del_port(p);
601: netdev_put(dev, &p->dev_tracker);
602: kfree(p); /* kobject not yet init'd, manually free */
603: goto err1;
604: }
605:
606: err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj),
607: SYSFS_BRIDGE_PORT_ATTR);
608: if (err)
609: goto err2;
610:
611: err = br_sysfs_addif(p);
612: if (err)
613: goto err2;
614:
615: err = br_netpoll_enable(p);
616: if (err)
617: goto err3;
618:
619: err = netdev_rx_handler_register(dev, br_get_rx_handler(dev), p);
620: if (err)
621: goto err4;
622:
623: dev->priv_flags |= IFF_BRIDGE_PORT;
624:
625: err = netdev_master_upper_dev_link(dev, br->dev, NULL, NULL, extack);
626: if (err)
627: goto err5;
628:
629: dev_disable_lro(dev);
630:
631: list_add_rcu(&p->list, &br->port_list);
632:
633: nbp_update_port_count(br);
634: if (!br_promisc_port(p) && (p->dev->priv_flags & IFF_UNICAST_FLT)) {
635: /* When updating the port count we also update all ports'
636: * promiscuous mode.
637: * A port leaving promiscuous mode normally gets the bridge's
638: * fdb synced to the unicast filter (if supported), however,
639: * `br_port_clear_promisc` does not distinguish between
640: * non-promiscuous ports and *new* ports, so we need to
641: * sync explicitly here.
642: */
643: fdb_synced = br_fdb_sync_static(br, p) == 0;
644: if (!fdb_synced)
645: netdev_err(dev, "failed to sync bridge static fdb addresses to this port\n");
646: }
647:
648: br_hr = br->dev->needed_headroom;
649: dev_hr = netdev_get_fwd_headroom(dev);
650: if (br_hr < dev_hr)
651: update_headroom(br, dev_hr);
652: else
653: netdev_set_rx_headroom(dev, br_hr);
654:
655: if (br_fdb_add_local(br, p, dev->dev_addr, 0))
656: netdev_err(dev, "failed insert local address bridge forwarding table\n");
657:
658: if (br->dev->addr_assign_type != NET_ADDR_SET) {
659: /* Ask for permission to use this MAC address now, even if we
660: * don't end up choosing it below.
661: */
662: err = netif_pre_changeaddr_notify(br->dev, dev->dev_addr,
663: extack);
664: if (err)
665: goto err6;
666: }
667:
668: err = nbp_vlan_init(p, extack);
669: if (err) {
670: netdev_err(dev, "failed to initialize vlan filtering on this port\n");
671: goto err6;
672: }
673:
674: spin_lock_bh(&br->lock);
675: changed_addr = br_stp_recalculate_bridge_id(br);
676:
677: if (netif_running(dev) && netif_oper_up(dev) &&
678: (br->dev->flags & IFF_UP))
679: br_stp_enable_port(p);
680: spin_unlock_bh(&br->lock);
681:
682: br_ifinfo_notify(RTM_NEWLINK, NULL, p);
683:
684: if (changed_addr)
685: call_netdevice_notifiers(NETDEV_CHANGEADDR, br->dev);
686:
687: br_mtu_auto_adjust(br);
688:
689: netdev_compute_master_upper_features(br->dev, false);
690:
691: kobject_uevent(&p->kobj, KOBJ_ADD);
692:
693: return 0;
694:
695: err6:
696: if (fdb_synced)
697: br_fdb_unsync_static(br, p);
698: list_del_rcu(&p->list);
699: br_fdb_delete_by_port(br, p, 0, 1);
700: nbp_update_port_count(br);
701: netdev_upper_dev_unlink(dev, br->dev);
702: err5:
703: dev->priv_flags &= ~IFF_BRIDGE_PORT;
704: netdev_rx_handler_unregister(dev);
705: err4:
706: br_netpoll_disable(p);
707: err3:
708: sysfs_remove_link(br->ifobj, p->dev->name);
709: err2:
710: br_multicast_del_port(p);
711: netdev_put(dev, &p->dev_tracker);
712: kobject_put(&p->kobj);
713: dev_set_allmulti(dev, -1);
714: err1:
715: return err;
716: }
SourceFile:net/bridge/br_if.c]
|
| 24/2 |
2026/08/10 01:30 |
llm |
expert |
0m
Model:
Tokens:
input: 30077
output: 38
thoughts: 1318
Thoughts: **Analysis of a Potential Denial of Service Vulnerability in Linux Networking**
Okay, let's break this down. First, there's no check in the kernel to prevent adding both ends of a veth pair to the same bridge. Not exactly a bug, more of an accepted "feature" that can create loops. And, yeah, we know what happens then: a broadcast storm.
The crash report mentions `macvlan_process_broadcast`, so *macvlan* is definitely involved. Looks like the loop is between a macvlan interface and its underlying device, or potentially between multiple macvlans. If a macvlan is in bridge mode, it naturally forwards packets. If that macvlan is *also* in a bridge, and its underlying device is in the *same* bridge, bam β loop. The stack trace confirms `macvlan_process_broadcast` is running, meaning a broadcast packet hit a macvlan interface.
Here's the mechanism: `macvlan_process_broadcast` pulls packets from the `bc_queue` and calls `macvlan_multicast_rx`. This then delivers the packet to all macvlan ports on the same lower device. If one of those ports is in a bridge, it gets forwarded to the bridge. If the bridge sends it back to the lower device, itβs received by the macvlan again, and gets added back to the `bc_queue`. This creates the loop, and since `macvlan_process_broadcast` processes the `bc_queue` via a workqueue, the process just keeps running, processing, and adding packets.
Hang on, the workqueue dequeues *all* packets currently in the queue at the time it starts, meaning it splices the queue to a local list. However, if new packets arrive, they go to the `bc_queue` and the work will be rescheduled. It will run again. But the workqueue thread will be the one processing the packets. Softirq is also processing the packets. The RCU stall is from CPU starvation.
So, the vulnerability is a classic Denial of Service via a network loop. But can an unprivileged user trigger it? Yes! If user namespaces are enabled, an unprivileged user can create a network namespace, create a bridge and veth/macvlan interfaces, and create the loop. This causes a broadcast storm which can lead to an RCU stall or softlockup, which can crash the system if `panic_on_rcu_stall` or `softlockup_panic` is set. Therefore, this is a DoS vulnerability accessible from user namespaces.
No memory corruption issues here. The report is just an RCU stall, with no KASAN or KMSAN reports and the stack traces look clean. The RCU stall is a direct consequence of the CPU starvation due to the broadcast storm.
**Dimensions:**
* **Exploitable:** No. It's just a CPU starvation / DoS.
* **Denial Of Service:** Yes. Causes an RCU stall that can panic the kernel.
* **Accessible From Unprivileged Processes:** No, requires `CAP_NET_ADMIN`.
* **Accessible From User Namespaces:** Yes, `CAP_NET_ADMIN` in user namespaces is sufficient.
* **VM Guest Trigger:** Potentially, if a guest can create the network loop. However the problem lies in where the loop is created. A guest can't create a loop in the *host* without misconfiguration.
* **VM Host Trigger in The Confidential Computing Context:** No.
* **Ethernet Network Trigger:** Yes, because it's triggered by network traffic (the broadcast packets), especially if a loop *already* exists. Even a single broadcast packet from an attacker triggers the storm if the loop exists.
* **Other Remote Trigger:** No.
* **Peripheral Trigger:** No.
* **Malicious Filesystem Trigger:** No.
So, potentially a bug in `macvlan`'s broadcast queue management? Yes, `macvlan_broadcast` just enqueues packets to `port->bc_queue`, so the fix would have to limit the broadcast queue.
|
| 25/2 |
2026/08/10 01:30 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/macvlan.c Name:macvlan_broadcast]
Results: map[SourceCode: 264: static void macvlan_broadcast(struct sk_buff *skb,
265: const struct macvlan_port *port,
266: struct net_device *src,
267: enum macvlan_mode mode)
268: {
269: const struct ethhdr *eth = eth_hdr(skb);
270: const struct macvlan_dev *vlan;
271: struct sk_buff *nskb;
272: unsigned int i;
273: int err;
274: unsigned int hash;
275:
276: if (skb->protocol == htons(ETH_P_PAUSE))
277: return;
278:
279: hash_for_each_rcu(port->vlan_hash, i, vlan, hlist) {
280: if (vlan->dev == src || !(vlan->mode & mode))
281: continue;
282:
283: hash = mc_hash(vlan, eth->h_dest);
284: if (!test_bit(hash, vlan->mc_filter))
285: continue;
286:
287: err = NET_RX_DROP;
288: nskb = skb_clone(skb, GFP_ATOMIC);
289: if (likely(nskb))
290: err = macvlan_broadcast_one(nskb, vlan, eth,
291: mode == MACVLAN_MODE_BRIDGE) ?:
292: netif_rx(nskb);
293: macvlan_count_rx(vlan, skb->len + ETH_HLEN,
294: err == NET_RX_SUCCESS, true);
295: }
296: }
SourceFile:drivers/net/macvlan.c]
|
| 26/2 |
2026/08/10 01:30 |
llm |
expert |
0m
Model:
Tokens:
input: 32872
output: 41
thoughts: 177
Thoughts: **Analyzing the Macvlan Crash**
Okay, so I'm seeing `macvlan_broadcast` in this crash report, and the backtrace points directly to `macvlan.c:279`. That's a great starting point. Let me quickly re-examine that crash report to confirm... Yep, there it is: `macvlan_broadcast+0x4a4/0x680 drivers/net/macvlan.c:279`, followed by the stack leading into it: `macvlan_multicast_rx` is called in line 304, which is inlined, then `macvlan_multicast_rx+0xd8/0x100 drivers/net/macvlan.c:298` and finally `macvlan_process_broadcast+0x3e4/0x690 drivers/net/macvlan.c:344`. Based on this information, let's zoom in on `macvlan_multicast_rx`.
|
| 27/2 |
2026/08/10 01:30 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/macvlan.c Name:macvlan_multicast_rx]
Results: map[SourceCode: 298: static void macvlan_multicast_rx(const struct macvlan_port *port,
299: const struct macvlan_dev *src,
300: struct sk_buff *skb)
301: {
302: if (!src)
303: /* frame comes from an external address */
304: macvlan_broadcast(skb, port, NULL,
305: MACVLAN_MODE_PRIVATE |
306: MACVLAN_MODE_VEPA |
307: MACVLAN_MODE_PASSTHRU|
308: MACVLAN_MODE_BRIDGE);
309: else if (src->mode == MACVLAN_MODE_VEPA)
310: /* flood to everyone except source */
311: macvlan_broadcast(skb, port, src->dev,
312: MACVLAN_MODE_VEPA |
313: MACVLAN_MODE_BRIDGE);
314: else
315: /*
316: * Flood to VEPA and bridge ports. We cannot distinguish
317: * a looped-back locally-originated multicast from one
318: * sent by an external source sharing the same source MAC
319: * (e.g., VRRP virtual MAC), so deliver to bridge ports
320: * as well to ensure correct reception in all cases.
321: */
322: macvlan_broadcast(skb, port, NULL,
323: MACVLAN_MODE_VEPA |
324: MACVLAN_MODE_BRIDGE);
325: }
SourceFile:drivers/net/macvlan.c]
|
| 28/2 |
2026/08/10 01:30 |
llm |
expert |
0m
Model:
Tokens:
input: 33807
output: 40
thoughts: 234
Thoughts: **My Analysis of the Macvlan Broadcast Path**
Okay, so let me break this down. My understanding is that when a broadcast packet hits a macvlan interface, the processing starts with `macvlan_process_broadcast`. That function then calls `macvlan_multicast_rx`, which in turn leads to the `macvlan_broadcast` function.
Now, `macvlan_broadcast` is where things get interesting. I see that it iterates through the `port->vlan_hash`. Within that loop, the function either calls `macvlan_broadcast_one` or directly calls `netif_rx` . Specifically, it's that direct call to `netif_rx(nskb)` that I'm focusing on.
`netif_rx` is the key. My thought is, that's what enqueues the broadcast packet onto the backlog queue of the current CPU. This will trigger a softirq to take action.
Here's the potential bottleneck: if there's a significant number of macvlan interfaces, that single broadcast packet will be *cloned* and enqueued *for each interface*. That means a potential of a large amount of extra work. This is the part that could become a performance concern, if not addressed.
The softirq handler then processes the backlog queue, and it's calling `__netif_receive_skb` for each of these cloned packets. Now, here's a wrinkle: if a macvlan interface happens to be part of a bridge, the bridge will, of course, forward the packet.
And, if that bridge *forwards* the broadcast packet *back* to the lower device of the macvlan (which is not an unrealistic scenario), that lower device will, naturally, receive it, triggering the execution of `macvlan_handle_frame`. So, we potentially have a loop here, a situation which could lead to some really interesting issues. This part is critical to be mindful of.
|
| 29/2 |
2026/08/10 01:31 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/macvlan.c Name:macvlan_handle_frame]
Results: map[SourceCode: 459: /* called under rcu_read_lock() from netif_receive_skb */
460: static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb)
461: {
462: struct macvlan_port *port;
463: struct sk_buff *skb = *pskb;
464: const struct ethhdr *eth = eth_hdr(skb);
465: const struct macvlan_dev *vlan;
466: const struct macvlan_dev *src;
467: struct net_device *dev;
468: unsigned int len = 0;
469: int ret;
470: rx_handler_result_t handle_res;
471:
472: /* Packets from dev_loopback_xmit() do not have L2 header, bail out */
473: if (unlikely(skb->pkt_type == PACKET_LOOPBACK))
474: return RX_HANDLER_PASS;
475:
476: port = macvlan_port_get_rcu(skb->dev);
477: if (is_multicast_ether_addr(eth->h_dest)) {
478: unsigned int hash;
479:
480: skb = ip_check_defrag(dev_net(skb->dev), skb, IP_DEFRAG_MACVLAN);
481: if (!skb)
482: return RX_HANDLER_CONSUMED;
483: *pskb = skb;
484: eth = eth_hdr(skb);
485: if (macvlan_forward_source(skb, port, eth->h_source)) {
486: kfree_skb(skb);
487: return RX_HANDLER_CONSUMED;
488: }
489: src = macvlan_hash_lookup(port, eth->h_source);
490: if (src && src->mode != MACVLAN_MODE_VEPA &&
491: src->mode != MACVLAN_MODE_BRIDGE) {
492: /* forward to original port. */
493: vlan = src;
494: ret = macvlan_broadcast_one(skb, vlan, eth, 0) ?:
495: __netif_rx(skb);
496: handle_res = RX_HANDLER_CONSUMED;
497: goto out;
498: }
499:
500: hash = mc_hash(NULL, eth->h_dest);
501: if (test_bit(hash, port->bc_filter))
502: macvlan_broadcast_enqueue(port, src, skb);
503: else if (test_bit(hash, port->mc_filter))
504: macvlan_multicast_rx(port, src, skb);
505:
506: return RX_HANDLER_PASS;
507: }
508:
509: if (macvlan_forward_source(skb, port, eth->h_source)) {
510: kfree_skb(skb);
511: return RX_HANDLER_CONSUMED;
512: }
513: if (macvlan_passthru(port))
514: vlan = list_first_or_null_rcu(&port->vlans,
515: struct macvlan_dev, list);
516: else
517: vlan = macvlan_hash_lookup(port, eth->h_dest);
518: if (!vlan || vlan->mode == MACVLAN_MODE_SOURCE)
519: return RX_HANDLER_PASS;
520:
521: dev = vlan->dev;
522: if (unlikely(!(dev->flags & IFF_UP))) {
523: kfree_skb(skb);
524: return RX_HANDLER_CONSUMED;
525: }
526: len = skb->len + ETH_HLEN;
527: skb = skb_share_check(skb, GFP_ATOMIC);
528: if (!skb) {
529: ret = NET_RX_DROP;
530: handle_res = RX_HANDLER_CONSUMED;
531: goto out;
532: }
533:
534: *pskb = skb;
535: skb->dev = dev;
536: skb->pkt_type = PACKET_HOST;
537:
538: ret = NET_RX_SUCCESS;
539: handle_res = RX_HANDLER_ANOTHER;
540: out:
541: macvlan_count_rx(vlan, len, ret == NET_RX_SUCCESS, false);
542: return handle_res;
543: }
SourceFile:drivers/net/macvlan.c]
|
| 30/2 |
2026/08/10 01:31 |
llm |
expert |
0m
Model:
Tokens:
input: 35940
output: 40
thoughts: 339
Thoughts: **My Analysis of the Macvlan Broadcast Handling**
Okay, so let me break this down. When a broadcast packet hits a macvlan interface, `macvlan_handle_frame` gets called. My initial thought is that it sees the broadcast and calls `macvlan_broadcast_enqueue`. Makes sense, right? This puts the packet onto the `port->bc_queue` and schedules `port->bc_work`. Simple enough, but... and here's the kicker, the return of `RX_HANDLER_PASS` is crucial. It means the packet doesn't just get handled by the macvlan; it also gets passed *down* to the lower device's regular receive path.
Hang on. If that lower device is part of a bridge, itβs going to trigger `br_handle_frame`. Now I see the potential for a network loop. If the bridge sends that broadcast back *up* to the lower device... we're right back where we started! That packet gets handled again, *potentially* making its way back into the bridge, and on and on.
Then, there's `macvlan_process_broadcast`. It dequeues the packet from `bc_queue` and calls `macvlan_multicast_rx`, which then calls `macvlan_broadcast`. And *that* calls `netif_rx(nskb)` for each macvlan interface. Which means the packet gets enqueued to the backlog queue. Eventually, when the backlog queue gets processed, it's delivered to the macvlan interface. And if *that* macvlan interface is bridged... the same potential loop exists through the bridge and down again. And if it's a veth on the lower device, it will eventually loop onto the other end of the veth, like an echo.
This entire process is just... convoluted, but fundamentally a network loop. Broadcasts are getting enqueued and transmitted multiple times, potentially forever.
My critical question is: what's the upper limit, if any, on the length of the `bc_queue`? We need to prevent a denial-of-service situation here. The design looks sound, in theory, but the *practicality* screams for a close look at how we limit this.
|
| 31/2 |
2026/08/10 01:31 |
tool |
codesearch-definition-source |
0m
Args: map[ContextFile:drivers/net/macvlan.c Name:macvlan_broadcast_enqueue]
Results: map[SourceCode: 355: static void macvlan_broadcast_enqueue(struct macvlan_port *port,
356: const struct macvlan_dev *src,
357: struct sk_buff *skb)
358: {
359: u32 bc_queue_len_used = READ_ONCE(port->bc_queue_len_used);
360: struct sk_buff *nskb;
361: int err = -ENOMEM;
362:
363: if (skb_queue_len_lockless(&port->bc_queue) >= bc_queue_len_used)
364: goto err;
365:
366: nskb = skb_clone(skb, GFP_ATOMIC);
367: if (!nskb)
368: goto err;
369:
370: MACVLAN_SKB_CB(nskb)->src = src;
371:
372: spin_lock(&port->bc_queue.lock);
373: if (skb_queue_len(&port->bc_queue) < bc_queue_len_used) {
374: if (src)
375: dev_hold(src->dev);
376: __skb_queue_tail(&port->bc_queue, nskb);
377: err = 0;
378: }
379: spin_unlock(&port->bc_queue.lock);
380:
381: queue_work(system_dfl_wq, &port->bc_work);
382:
383: if (err)
384: goto free_nskb;
385:
386: return;
387:
388: free_nskb:
389: kfree_skb_reason(nskb, SKB_DROP_REASON_MACVLAN_BROADCAST_BACKLOG);
390: err:
391: dev_core_stats_rx_dropped_inc(skb->dev);
392: }
SourceFile:drivers/net/macvlan.c]
|
| 32/2 |
2026/08/10 01:31 |
llm |
expert |
0m
Model:
Tokens:
input: 37422
output: 66
thoughts: 2242
Thoughts: **Analysis of a Network Loop-Induced Denial of Service**
Okay, so there's this `bc_queue_len_used` limit, defaulting to around 1000, which *should* prevent infinite queue growth. But if packets are constantly arriving, that queue will remain full, triggering constant execution of `macvlan_process_broadcast`. That function has `cond_resched()`, so it *shouldn't* cause an RCU stall directly. However, the softirq processing incoming, looping packets will monopolize the CPU. `net_rx_action` is invoked within softirq and does limit itself, yielding periodically, but if the loop is fast enough, the CPU can get stuck in the softirq. That sounds like a known network loop problem.
Now, could there be *another* bug here? Let me look at the RCU GP kthread's stack trace... It looks like it's waiting for quiescent states. And CPU 0 is hung up in `__batadv_dat_purge`. But wait, that's just a workqueue item (`bat_events`) that got interrupted by a softirq. The softirq's processing packets. So it's not a lock contention issue; it's the softirq taking too long.
Let's check for any existing CVEs or fixes for the specific RCU stall issue with `macvlan_process_broadcast` and `batadv_dat_purge`. Turns out, `batadv_dat_purge` is just a task that *happened* to be running when the softirq hit. The real issue is the broadcast storm caused by the network loop. Syzkaller finds these all the time because of its random network interface connections. The kernel developers consider these to be configuration errors, but they have added mitigations like `cond_resched()`. Still, a CPU stall is possible.
Exploitable? No, not really. It's a DoS. Not accessible from unprivileged processes if we assume user namespaces are not accessible. It is accessible from user namespaces because in a user namespace with all capabilities, one can create a loop. It's not a VM guest trigger. It's triggered by Ethernet network traffic.
Okay, let's nail down those dimensions: Exploitable: No. Denial of Service: Yes. Accessible From Unprivileged Processes: No. Accessible From User Namespaces: Yes. VM Guest Trigger: No. Ethernet Network Trigger: Yes.
But wait, about "Accessible From Unprivileged Processes". The prompt says, no user namespaces. So that's no bridges, no macvlans, no loops.
Can an *unprivileged* user send a broadcast packet to an existing network loop? Yes, if the loop is already there, then an unprivileged user can trigger the storm with a broadcast packet. But the vulnerability is the *loop creation*, which does require `CAP_NET_ADMIN`.
Let's clarify "Ethernet Network Trigger": It's the processing of ingress Ethernet traffic that causes the problem here.
And "VM Guest Trigger". If a guest is connected to a host bridge, and the guest sends a broadcast, that will hit the host's bridge. If the host has a loop, the loop is already there. The *guest* cannot create it, unless, it has multiple virtio-net interfaces attached to the same host bridge. Then, the guest can bridge them together within the guest. So if the host bridge -> virtio-net 1 -> Guest bridge -> virtio-net 2 -> Host bridge, there will be a loop. A broadcast packet will loop endlessly, but that involves *host* CPU processing and shouldn't cause a host RCU stall. `vhost-net`'s vhost threads might consume a lot of CPU, but that's normal packet processing in task context.
So, a guest *can't* trigger the RCU stall unless it can configure the host. VM Guest Trigger: No.
Let's double-check again... Oh, KCOV... That's harmless. RCU stall... That's standard.
Confident. This is a DoS via a network loop, accessible from user namespaces. Time to mark the results.
|
| 33/2 |
2026/08/10 01:31 |
tool |
set-results |
0m
Args: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
Results: map[DenialOfService:true Exploitable:false FilesystemTrigger:false NetworkTrigger:true PeripheralTrigger:false RemoteTrigger:false Unprivileged:false UserNamespace:true VMGuestTrigger:false VMHostTrigger:false]
|
| 34/2 |
2026/08/10 01:31 |
llm |
expert |
0m
Model:
Tokens:
input: 40697
output: 680
thoughts: 225
Thoughts: **Final Response: Understanding the Network Loop Bug**
Okay, the results are in, and now it's time to craft the final response. My analysis has led me to a pretty clear conclusion: this is a classic CPU starvation/Denial of Service (DoS) vulnerability triggered by a network loop.
Essentially, a network loop β think of a veth pair connected to a bridge, or a looped macvlan interface β creates an endless cycle of broadcast packets. You get a massive broadcast storm, which is, frankly, expected in such a configuration.
That storm then completely overwhelms the CPU. I see this in the softirq packet processing (`net_rx_action`, `br_handle_frame`, etc.) and workqueue processing (`macvlan_process_broadcast`). It's a deluge of packet handling that starves other essential tasks, crucially including the RCU grace period kthread.
The continuous starvation of the CPU by the network processing ultimately leads to an RCU stall. If things get bad enough, a kernel panic is even possible.
I've also confirmed that setting up this kind of problematic network topology requires `CAP_NET_ADMIN` privileges, which means it's obtainable within a user namespace. So, while it's accessible from user namespaces, it's not a concern for completely unprivileged processes.
The implications are important; while this is a DoS, it isn't something that can be exploited for privilege escalation or to leak sensitive information. My assessment confirms that there's no memory corruption involved here. It's simply a matter of flooding the system with network traffic β a broadcast packet entering the looped topology and the fun begins.
|
| 35/1 |
2026/08/10 01:31 |
action |
format-explanation |
0m
Results: map[Explanation:Based on the analysis of the crash report and the kernel source code, here is
the assessment of the bug:
**Root Cause Analysis:**
The crash report indicates an RCU stall (`rcu_preempt detected stalls on
CPUs/tasks`) where the RCU grace-period kthread is starved for CPU time. The
stack traces show that the CPUs are overwhelmed by network packet processing.
Specifically, CPU 0 is stuck processing softirqs (`net_rx_action` ->
`br_handle_frame` -> `ip6_mc_input`), and another task is continuously
processing macvlan broadcast packets in a workqueue
(`macvlan_process_broadcast`).
The kernel logs also show a flood of warnings from the bridge subsystem:
`bridge0: received packet on bridge_slave_0 with own address as source address
(addr:aa:aa:aa:aa:aa:1b, vlan:0)`
This warning is printed by `br_fdb_update()` when a bridge receives a packet
that originated from its own MAC address. This is a classic symptom of a
**network loop** (e.g., connecting both ends of a `veth` pair to the same
bridge, or a loop involving `macvlan` interfaces).
Because Ethernet frames do not have a Time-To-Live (TTL) field, broadcast
packets in a loop will circulate endlessly and be duplicated, creating a
broadcast storm. The kernel spends all its CPU time in softirq and workqueue
contexts trying to process this infinite stream of packets, which starves normal
tasks and the RCU kthread, eventually triggering an RCU stall panic.
**Security Impact:**
* **Exploitable:** No. This is a resource exhaustion issue (CPU starvation).
There is no memory corruption, use-after-free, or information leak involved.
* **Denial Of Service:** Yes. The broadcast storm monopolizes the CPU, causing
an RCU stall which can lead to a kernel panic (if `panic_on_rcu_stall` is
enabled) or a complete system lockup.
* **Accessible From Unprivileged Processes:** No. Creating network interfaces
(like bridges, veth pairs, and macvlans) and altering their topology requires
`CAP_NET_ADMIN` privileges.
* **Accessible From User Namespaces:** Yes. An unprivileged user can create a
new user namespace and a new network namespace, gaining `CAP_NET_ADMIN` within
that namespace. They can then create the looped network topology to trigger the
broadcast storm and crash the host kernel.
* **Ethernet Network Trigger:** Yes. Once the looped topology is configured, any
ingress broadcast packet (e.g., ARP request, IPv6 multicast) will trigger the
storm.
* **VM Guest Trigger:** No. A typical KVM guest cannot create a tight loop in
the host's kernel networking stack (like a bridge-veth loop) unless the host is
already severely misconfigured to allow it. If a guest bridges two of its own
virtio-net interfaces, the packet loop will have to cross the guest/host
boundary (involving context switches and virtqueue processing), which is too
slow to cause a tight softirq storm that starves RCU in the host kernel.]
|