netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] bonding: fix send_peer_notif data truncation
@ 2021-01-26 11:52 liaichun
  2021-01-27  2:19 ` Jakub Kicinski
  2021-01-27  5:05 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: liaichun @ 2021-01-26 11:52 UTC (permalink / raw)
  To: Stephen Hemminger, David Ahern, davem@davemloft.net,
	kuba@kernel.org
  Cc: netdev@vger.kernel.org

send_peer_notif is u8, the value of this parameter is obtained from u8*int, the data may be truncated.
 And in practice, more than u8(256)  characters are used.
Fixes: 07a4ddec3ce9 ("bonding: add an option to specify a delay between peer notifications")

Signed-off-by: Aichun Li <liaichun@huawei.com>
---
 include/net/bonding.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/bonding.h b/include/net/bonding.h index 0960d9af7b8e..65394566d556 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -215,7 +215,7 @@ struct bonding {
 	 */
 	spinlock_t mode_lock;
 	spinlock_t stats_lock;
-	u8	 send_peer_notif;
+	u64	 send_peer_notif;
 	u8       igmp_retrans;
 #ifdef CONFIG_PROC_FS
 	struct   proc_dir_entry *proc_entry;
--
2.19.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-27  5:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 11:52 [PATCH net] bonding: fix send_peer_notif data truncation liaichun
2021-01-27  2:19 ` Jakub Kicinski
2021-01-27  5:05 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).