bianbu-linux-6.6/drivers/net/bonding
Hangbin Liu 9949e2efb5 bonding: fix send_peer_notif overflow
Bonding send_peer_notif was defined as u8. Since commit 07a4ddec3c
("bonding: add an option to specify a delay between peer notifications").
the bond->send_peer_notif will be num_peer_notif multiplied by
peer_notif_delay, which is u8 * u32. This would cause the send_peer_notif
overflow easily. e.g.

  ip link add bond0 type bond mode 1 miimon 100 num_grat_arp 30 peer_notify_delay 1000

To fix the overflow, let's set the send_peer_notif to u32 and limit
peer_notif_delay to 300s.

Reported-by: Liang Li <liali@redhat.com>
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2090053
Fixes: 07a4ddec3c ("bonding: add an option to specify a delay between peer notifications")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-05-10 09:27:20 +01:00
..
bond_3ad.c drivers/net/bonding/bond_3ad: return when there's no aggregator 2023-01-03 09:17:12 +00:00
bond_alb.c bonding: fix reference count leak in balance-alb mode 2022-08-11 08:51:05 -07:00
bond_debugfs.c bonding: fix error checking in bond_debug_reregister() 2023-02-03 19:22:20 -08:00
bond_main.c bonding: add xdp_features support 2023-05-05 09:34:23 +01:00
bond_netlink.c bonding: fix send_peer_notif overflow 2023-05-10 09:27:20 +01:00
bond_options.c bonding: fix send_peer_notif overflow 2023-05-10 09:27:20 +01:00
bond_procfs.c bonding: show NS IPv6 targets in proc master info 2022-05-31 10:50:02 +02:00
bond_sysfs.c driver core: class: mark the struct class for sysfs callbacks as constant 2023-03-29 07:54:58 +02:00
bond_sysfs_slave.c net: bonding: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-30 12:29:45 +01:00
bonding_priv.h drivers: Remove inclusion of vermagic header 2020-04-21 13:27:37 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00