lkml.org 
[lkml]   [2024]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [syzbot] [net?] KMSAN: uninit-value in hsr_get_node (2)
Date
please test uninit-value in hsr_get_node

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9f8413c4a66f

diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c
index 6d14d935ee82..280dca33ec4f 100644
--- a/net/hsr/hsr_framereg.c
+++ b/net/hsr/hsr_framereg.c
@@ -209,6 +209,8 @@ struct hsr_node *hsr_get_node(struct hsr_port *port, struct list_head *node_db,
return NULL;

ethhdr = (struct ethhdr *)skb_mac_header(skb);
+ if (!is_valid_ether_addr(ethhdr->h_source))
+ eth_zero_addr(ethhdr->h_source);

list_for_each_entry_rcu(node, node_db, mac_list) {
if (ether_addr_equal(node->macaddress_A, ethhdr->h_source)) {

\
 
 \ /
  Last update: 2024-01-15 14:02    [W:0.303 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site