From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.70 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796052712; b=bdWLyONa7pVacZsTkCdhg7aQnYkBdpdEfGSn2Gp1dvF2W/cbgUJE/g5yPYnjm0hkdbin s1uVpgDxIHun/W+nsXL0ByapQ8wCVEiFvaILjzPGdvNA2xKXRxQiTgti50yVc5zoh8BPC OTKdA9zwbGseWd8x7iuqCc6SZRpPrFreIakzY8BtYOxQEfsaVpWjp6EVKT0kgkv/58uJc RTHftT9LM9q0NW94LiIC/mbilvJTNAVqZsfmMm3HUue3yBxHY+TMXw2i2ub+S8IbNQtD8 dZ3K2bRxoazXrxmvsOTQ8Mknp+HdM3oAjSY20ZZQRfCHMMDd4F5dHEBbb0Tz3xYRZ1Q== 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=p/8CxoP8GpAMr3fWjAsxD5KWtwG/F9GOtcpjRcaLp1We1yQiA9qmX7ukHCmyD41i3zqW 38/aS1+IzT8/re1KKfkyqB931Y/O8t+Sr+BhdW1TS8pRtdhKy8WShDO/5Gq8FFkiVbtLs taixa3lYdyoTmsn+MuNh0LJkt88aqx0hr9OIQCPVTsQ7ejk2yWlIO5iaxLDlVz2/FhASz 3NKyodJN9mMj32YqhvTPCbEOddsOgjuSIJutdAWwGIH+wlUk4OboR24p2/S4/zgWWWD3w OliuH78C2tHCIukKSt0atsaJsg0TIq/FBHyOovXH3EuuJpeMPksBoEcKX5/gnx6lF2w== 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.70 Received: from mail-yx1-f70.google.com (mail-yx1-f70.google.com [74.125.224.70]) (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 CEE2D606A33E for ; Mon, 30 Nov 2026 15:31:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CEE2D606A33E 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-f70.google.com with SMTP id 956f58d0204a3-679f81d5d7bso17280233d50.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=ugw4yzdtYETEtqNIbWOi/8nmD054jz2AzNa5MOLarDWYr4p+cj+khfwXvLtxAJhwtn CatH8olU2jF2Yu3g3gX7BAI1Ft2GsGVfsFxKdQAmAvUvVK8FrkjnaPu01rMn5NggBUiq 9Lcmh6KPd+2F1Nj8MPz37dp7aG9pBX7/Y8me556C9K7YH3KKcnp1qI6E3uMAr2V3IEI/ eDqtUU4xrZieV3sfCcX/ui7+5kXWI0eksG8VEQ8f9si12/xf+kdGXo+qjRSVsPfdr33Y rhxoUcOkN9QP55qPPWwG7b88SBke/44NRgfu8OUvgdf+CrtJySF9EvG4F2Yhs29B2GQ9 L0bg== X-Forwarded-Encrypted: i=1; AL+hErEW05qfxHKsOuMzScD5sN3p0vt+bgZqQFDYu9+b72Ab77SGLPUN31mmplDYxy4dN4hZWPpvDGQRPEob+WU=@vger.kernel.org X-Gm-Message-State: APuU4Z/+U/9ls6iLA9EVB7LTMAoH2xrdJHa4wp5+kUzW8c2DNxghb5lg Jk/cqMjXzebyNmNRy1MIfpHGSIkKCAw1Uv/fcNOFh0OzRSaS/3OS43IJepX6wgncVeHHSqZcF4M wcw9Nkucv5Q== 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: linux-kernel@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.