From: liaichun <liaichun@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"kuba@kernel.org" <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net] bonding: fix send_peer_notif data truncation
Date: Tue, 26 Jan 2021 11:52:01 +0000 [thread overview]
Message-ID: <e27dd20165a14d99bc2b406061e60bcd@huawei.com> (raw)
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
next reply other threads:[~2021-01-26 11:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 11:52 liaichun [this message]
2021-01-27 2:19 ` [PATCH net] bonding: fix send_peer_notif data truncation Jakub Kicinski
2021-01-27 5:05 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e27dd20165a14d99bc2b406061e60bcd@huawei.com \
--to=liaichun@huawei.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).