lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <00000000000091e02f0620ddf5cf@google.com>
Date: Thu, 29 Aug 2024 20:12:20 -0700
From: syzbot <syzbot+3d602af7549af539274e@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [net?] WARNING in hsr_fill_frame_info

For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.

***

Subject: Re: [syzbot] [net?] WARNING in hsr_fill_frame_info
Author: lizhi.xu@...driver.com

missing lock before call hsr_forward_skb

#syz test

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index e4cc6b78dcfc..32b43bd9f542 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -405,11 +405,15 @@ static void hsr_announce(struct timer_list *t)
 
 	rcu_read_lock();
 	master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
+	if (!master)
+		goto out;
+
 	hsr->proto_ops->send_sv_frame(master, &interval, master->dev->dev_addr);
 
 	if (is_admin_up(master->dev))
 		mod_timer(&hsr->announce_timer, jiffies + interval);
 
+out:
 	rcu_read_unlock();
 }
 
@@ -427,6 +431,9 @@ static void hsr_proxy_announce(struct timer_list *t)
 	 * of SAN nodes stored in ProxyNodeTable.
 	 */
 	interlink = hsr_port_get_hsr(hsr, HSR_PT_INTERLINK);
+	if (!interlink)
+		goto out;
+
 	list_for_each_entry_rcu(node, &hsr->proxy_node_db, mac_list) {
 		if (hsr_addr_is_redbox(hsr, node->macaddress_A))
 			continue;
@@ -440,6 +447,7 @@ static void hsr_proxy_announce(struct timer_list *t)
 
 		mod_timer(&hsr->announce_proxy_timer, jiffies + interval);
 	}
+out:
 
 	rcu_read_unlock();
 }
diff --git a/net/hsr/hsr_slave.c b/net/hsr/hsr_slave.c
index af6cf64a00e0..3971dbc0644a 100644
--- a/net/hsr/hsr_slave.c
+++ b/net/hsr/hsr_slave.c
@@ -67,7 +67,9 @@ static rx_handler_result_t hsr_handle_frame(struct sk_buff **pskb)
 		skb_set_network_header(skb, ETH_HLEN + HSR_HLEN);
 	skb_reset_mac_len(skb);
 
+	spin_lock_bh(&hsr->seqnr_lock);
 	hsr_forward_skb(skb, port);
+	spin_unlock_bh(&hsr->seqnr_lock);
 
 finish_consume:
 	return RX_HANDLER_CONSUMED;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ