Re: [PATCH net v7] arp: Do not update neighbours from ARP in L2 multicast/broadcast frames
From: willemb
Date: Mon Nov 30 2026 - 10:31:58 EST
Star Chang wrote:
Thanks for the review.
> [Medium] Should these packets be consumed instead of dropped?
I chose to drop them because, with the knob set, ARP in L2 BMC frames
is rejected for neighbour learning, similar to how the IP paths drop
unicast packets in L2 BMC frames. But you have a point that ordinary
broadcast requests for other hosts would then show up as drops. I'm
fine with switching to consume_skb() or a specific drop reason if the
maintainers prefer.
> [Medium] ... changes the semantics of an existing IP-only knob
This is intended. With the knob set, ARP in L2 BMC frames is not trusted
for neighbour learning: a forged GARP or broadcast reply/request with
sip = gateway is exactly the attack. Ignoring announcements and arp_accept
for such frames follows from that, and the knob is opt-in
(drop_gratuitous_arp already drops GARP entirely).
The same applies to IPv4 link-local peers that broadcast their replies
(RFC 3927): exempting them would let an attacker forge those entries
again, so I'd rather keep it strict and document it, if wanted.
The following two likely are rewordings of the same issues raised by Sashiko.
Reusing drop_unicast_in_l2_multicast to block all L2 BMC ARP learning changes
the semantics of an existing IP-only (RFC 1122 3.3.6) knob that was introduced
separately from drop_gratuitous_arp (commit 97daf3314550). Existing users with
drop_unicast_in_l2_multicast=1 and drop_gratuitous_arp=0 will now silently lose:
- IPv4 link-local (169.254/16) connectivity against RFC 3927 section 2.5
peers, which broadcast ARP replies (INCOMPLETE entries will never resolve),
- GARP failover updates (VRRP/keepalived/bonding/arp_notify), and
- arp_accept for L2 BMC frames.
Is it in any way possible to address the underlying bug, without such a
behavioral change?
--
> out_free_skb:
> kfree_skb(skb);
> return NET_RX_DROP;
[severity: medium, confidence: high]
Every ordinary broadcast ARP request for another host on the LAN falls through
here. Before this patch those frames exited via out_consume_skb (consume_skb()
and NET_RX_SUCCESS); now they hit kfree_skb() with SKB_DROP_REASON_NOT_SPECIFIED
and return NET_RX_DROP through NF_HOOK() -> arp_rcv() -> netif_receive_skb(),
triggering constant dropwatch/drop_monitor noise and inflating rx_dropped in
drivers that check NET_RX_DROP (compare arp_rcv()'s explicit consumeskb comment
just below).
Jumping to out_consume_skb here (and removing out_drop_dst) avoids spurious
drops on background broadcast ARP requests while still releasing reply_dst. (If
drop visibility is specifically desired for broadcast ARP replies, only drop
ARPOP_REPLY with an explicit drop reason and consume ARPOP_REQUEST.)
Is that last suggestion a way to avoid too many false positive drop counter
increases? Else, consume_skb is probably preferable overall.