From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796052712; b=TwShPjerrHYH0RRhdKh2AgW4vcedAYhYnLdpQzC8QzIXfNrIYAfMrlQfSOKiGdpJGxX1 A5AFT37EvdE9Pz5nHrEw2NKsJGsnM8MDZHzrBXWkMnIoKzKSSoV07mGB9zNPCRo0qv5MW vBbxJtR+Oz7HGOQnIs99clqGbLThjRIgeFw3bmOYeMXF7pbIZO/H3mN+ncl/SeW7X3isy 2W7k8cA4S/1VkmhGk38MK4zJXPSt8OS58NkLH/sqFUZsNuawFhXuE0Eb7pfY7goSNWXfk kJ7Zh0YlV5aZpqeJU162KOv5H1pkECKwViQLzgXCEMtC25Ba1myOICUBt8Nhmj6LEJQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796052712; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type; bh=SGSJ4yecW4DaAx1eRJk/SEd2jC3U7wVsqKEOKO7n4xU=; b=LhuvS3dCI6oTLXGhHBQXdd+0NWWYjplyuYwRXIsyo9UgsjLGsUH0uNr0T164kn4M/c4C mw5mN+M1ZJExw0nd7wgV93WhgQuaO/l88pBmZysGHhBiGjCF4n23e3CU0quAuoGJgc++U b8J/zx6JUdMlK9OAP6QNJ6/U4uSvcWoPeD+axBoQ1mP8tNW6lRra+BdFBoFQ2s6zcvoME STxy5pYJOgYZ4dlAThgoXHgw5cCiGYlu6ZS/qentsRKyIAO4EknRrJ/bwgDxlGDi06vjC /KMSCV7941OQbquMbU6rdOII4r0q34B5RYSm7z5WeyBGsqETYSsE2jZC4BvURfVIe1A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=m7By6KC3; arc=none smtp.remote-ip=74.125.224.71 Received: from mail-yx1-f71.google.com (mail-yx1-f71.google.com [74.125.224.71]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9818606A683 for ; Mon, 30 Nov 2026 15:31:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D9818606A683 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--willemb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=m7By6KC3 Received: by mail-yx1-f71.google.com with SMTP id 956f58d0204a3-679f81d5d7bso17280231d50.2 for ; Mon, 30 Nov 2026 07:31:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796052711; x=1796657511; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SGSJ4yecW4DaAx1eRJk/SEd2jC3U7wVsqKEOKO7n4xU=; b=m7By6KC3NGBD/OBuGA0NWDsc4rPOu3VL436ucbt4GUm93nruSZ4lq574j81nxTpEJz QEU2y0gHhoaf/N7DvS0Z9ZhzKjxYTcMdDIwyO6PC0U2P8V2a2kHgbfp70cGA2szWdzde 12JiqoAP3kXihxI/PyRTtJEl0dN/Uy/OqBJ7gTLI95u+c+63cCLlXajYCDTcH7YDOgyt cLHNXxKD/iEsgDFKXtwSwG59EpZGTHTeemJ+KkM8v5IVPxc4noQ162mrHe1qN8DnzvP6 w6yrge3ob0gPEUise9gZFHnX8NFfsiqAhigG6uC9U2z1dDQzl7g75tI3HFWsL79D8JAv KeIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796052711; x=1796657511; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SGSJ4yecW4DaAx1eRJk/SEd2jC3U7wVsqKEOKO7n4xU=; b=POvjY2hGbEcqhjnqbzrn9IrEOykOXGnYv594yjI/QVrXMwCMjABBV6IwjNnUVG0S9M WlhpNsgFEvdTgNgchUY9xsht+Jjernd+67EQz6CDlWmj/DcdDHwkW/KtJoUed3NKQia5 V2fXI51XWV1JsrGvBPjfrz1AQcZyd+DDgYBiy2oToBuhFDRwSh/A58oGfr82GHjz2/T3 m17/LhV3GoZHMEvFu0BEYGQUsKjyRKkTeEXFWhUfTkAn7JLxtFov2FZowaJh4KZzfLtL 3EzyRzY1HWJCorOSJNHNnqyyoqABv+OHFnwArcuOQ3pGX73zXkQUikOcAM9JegEo22yM 8g1w== X-Forwarded-Encrypted: i=1; AL+hErFfilkH+gkhjElD2VD2AoLknTpcndVlEZV2/MUDI18QiIneWYi/O0EAXxZBcJLQJuo6e6GK6IM=@vger.kernel.org X-Gm-Message-State: APuU4Z8fQ6cSehoIIRbv936E1jNzaHhGKrXFuJ1D8Qyfo6gJC8SoXFDm bLZ+mrzhKM2I5GzIfal3I0aQA0xjO/tU+TIrT7lHGml5JHrJvLXytbKB2PQtk43nkKf2SWxlldV 8avhxXF0BBA== X-Received: from qvbpx16.prod.google.com ([2002:a05:6214:510:b0:91e:b452:ac2f]) (user=willemb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:690e:4093:b0:67e:9b9c:e8dc with SMTP id 956f58d0204a3-67e9b9cf102mr891026d50.87.1796052710377; Mon, 30 Nov 2026 07:31:50 -0800 (PST) Date: Mon, 30 Nov 2026 10:31:49 -0500 In-Reply-To: <20261125055416.1987174-1-starchang@google.com> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261123144535.155300-1-starchang@google.com> <179553165359.3135.5730863120205025514@kernel.org> <20261125055416.1987174-1-starchang@google.com> Message-ID: Subject: Re: [PATCH net v7] arp: Do not update neighbours from ARP in L2 multicast/broadcast frames From: willemb@google.com To: Star Chang , netdev-bot+sashiko@kernel.org Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Willem de Bruijn , Simon Horman , David Ahern , Ido Schimmel , Julian Anastasov , Johannes Berg , Jonathan Corbet , Shuah Khan , Randy Dunlap , netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, wangroger@google.com, starchang@google.com Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes 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.