umber-kernel/drivers/net/bonding
Hangbin Liu 067bf016e9 bonding: fix NULL pointer dereference in actor_port_prio setting
Liang reported an issue where setting a slave’s actor_port_prio to
predefined values such as 0, 255, or 65535 would cause a system crash.

The problem occurs because in bond_opt_parse(), when the provided value
matches a predefined table entry, the function returns that table entry,
which does not contain slave information. Later, in
bond_option_actor_port_prio_set(), calling bond_slave_get_rtnl() leads
to a NULL pointer dereference.

Since actor_port_prio is defined as a u16 and initialized to the default
value of 255 in ad_initialize_port(), there is no need for the
bond_actor_port_prio_tbl. Using the BOND_OPTFLAG_RAWVAL flag is sufficient.

Fixes: 6b6dc81ee7 ("bonding: add support for per-port LACP actor priority")
Reported-by: Liang Li <liali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20251105072620.164841-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-06 07:16:37 -08:00
..
Makefile
bond_3ad.c bonding: support aggregator selection based on port priority 2025-09-09 10:56:02 +02:00
bond_alb.c net: core: Convert dev_set_mac_address() to struct sockaddr_storage 2025-05-27 08:25:43 +02:00
bond_debugfs.c saner replacement for debugfs_rename() 2025-01-15 13:14:37 +01:00
bond_main.c net: bonding: fix possible peer notify event loss or dup issue 2025-10-23 13:08:53 +02:00
bond_netlink.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-10-01 10:14:49 +02:00
bond_options.c bonding: fix NULL pointer dereference in actor_port_prio setting 2025-11-06 07:16:37 -08:00
bond_procfs.c
bond_sysfs.c bonding: Remove support for use_carrier 2025-09-02 14:01:54 -07:00
bond_sysfs_slave.c
bonding_priv.h