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=sMktpAWSx/ZMpV2K4r/JZU1BhNA/f9JfwPGklQap1ftt39Q+n3UAR4HWFS3VSE6fole2 92QWv+j4bOJErUMmXu7cUPRL8uCFWeMpYspwu9v4j9qtDOcTM37otL/4QWvskpqKwh6rC rvVi2YDvO+iCCk5tVl1DwulMtGAGDk0XssbkKvuoBmFpOTUNRJ9Cv7HxV62B+z5pISeb1 zRvPbbK6t5mYfA9PlRcVbg9osnvYRH3q47+K0aBrmKTq7l9hA+HAH5xu/bHJXIr8lTt/1 TbDsty0HVu1Ukd08UEukIDqe7U3EM/4YxhFUcoKKtJ85Cpo26M9QqgbYAQJX058Bphg== 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=tjcfn7Yx488isjxM1jzsrnfpAIGlrWcrYY4O/DWe+g4TMaEHIRe/2EuER+TSUmhTX6rM Zv2JMkPAUtrd1WBnEdUsbjwvs42bPZkZoNKUebI0W61s1v7FxpilPHlhIWvef/iiptMEH AOdJ8PE/mNaxR3p9k3xL3uyoiXZda/BNAmQMMl7xOuGUgaXXkyu6pO8rjirJRY3X7ukpZ zEpVUVQ9184CzqBcx64GrLR2YGHotGph73OHfpgtW0vBQSl8FaIUvi2SRjKsACZj7hIA8 IW1yOHWTNR0ruthi/Mzk9Se6FrXQsPPSnkopw2Biyd08REhQ30VwaKF85YKHiGpqRUg== 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 DA2B3606A685 for ; Mon, 30 Nov 2026 15:31:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA2B3606A685 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-67dcb5f084cso18484462d50.1 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=TwcBEzZ2LxJVFLM8eV66vItguL6/WXJqQrAjDzN3BQOQ/7S7oA0HG9apDaXbdzxftW bmCPN/RaTEFeQcikVDEOVHKzXqkplY/UdHqoZ2CuIEz1JVvlqhshfND3+LHX9M5PBA91 Avd+XcipIRtxfurotA4Mu57mQBi/N83bVLvG0ldjIn05vUwSNli75rc4j+ChCJGTdVy+ BrBjHs+GuarDdG/J+wbbG5Ex2svWaW7S6FMfs1D8w/EkfuqQH4ur3iM1M5HABz9ywHbh d5ZC2Kn5N80Qkj0Y8OBR2rhWweamwbkdcKdpFj5Tq8UuDH6tH2mkvAVkvDrFIFqxMxw5 oRTw== X-Forwarded-Encrypted: i=1; AL+hErGstZ2O4ZKVvJTlQYFwyloNcSrJM6/IeqE3mF8DD9VJkVf1bdKF9ObwS5c9aNYffObut2Y17g613wA=@vger.kernel.org X-Gm-Message-State: APuU4Z+vGd7lQbryikLx7o+lrEwzbcvA3zN/PPGSxs8IeRJsBHgxR2lU 5daQgJHSHZBbPUIvNE8vgHEdr/7l1jP0WgKu3tMcD0o/C52YbbXVe+3U8NDnM0ua+QB2GCeyoSt 1KW/h8OOjgA== 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-doc@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.