bonding: fix null pointer deref in bond_ipsec_offload_ok
authorNikolay Aleksandrov <razor@blackwall.org>
Fri, 16 Aug 2024 11:48:11 +0000 (14:48 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 20 Aug 2024 13:29:28 +0000 (15:29 +0200)
commit95c90e4ad89d493a7a14fa200082e466e2548f9d
tree3cf4de0de4064901e3b364f3d148accca353e9f8
parentfc59b9a5f7201b9f7272944596113a82cc7773d5
bonding: fix null pointer deref in bond_ipsec_offload_ok

We must check if there is an active slave before dereferencing the pointer.

Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves")
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/bonding/bond_main.c