Thread (11 messages) 11 messages, 2 authors, 2025-12-22

Re: [PATCH RFC net 1/5] arp: discard sha bcast/null (bcast ARP poison)

From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Date: 2025-12-22 09:47:27

On 21/12/2025 21:19, Marc Suñé wrote:
  
  /*
+ *	For Ethernet devices, Broadcast/Multicast and zero MAC addresses should
+ *	never be announced and accepted as sender HW address (prevent BCAST MAC
+ *	and NULL ARP poisoning attack).
+ */
+	if (dev->addr_len == ETH_ALEN &&
dev_type == ARPHRD_ETHER ?
+	    (is_broadcast_ether_addr(sha) || is_zero_ether_addr(sha)))
RFC says that neither broadcast, nor multicast must be believed. You
check for broadcast only. The better check would be:

!is_unicast_ether_addr(sha)
+		goto out_free_skb;
+
+ /*
   *     Special case: We must set Frame Relay source Q.922 address
   */
  	if (dev_type == ARPHRD_DLCI)
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help