Skip to content

Commit 25b0881

Browse files
committed
bonding: fix null pointer deref in bond_ipsec_offload_ok
jira LE-3201 cve CVE-2024-44990 Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10 commit-author Nikolay Aleksandrov <[email protected]> commit 95c90e4 We must check if there is an active slave before dereferencing the pointer. Fixes: 18cb261 ("bonding: support hardware encryption offload to slaves") Signed-off-by: Nikolay Aleksandrov <[email protected]> Reviewed-by: Hangbin Liu <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> (cherry picked from commit 95c90e4) Signed-off-by: Jonathan Maple <[email protected]>
1 parent c81f67f commit 25b0881

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ static bool bond_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *xs)
579579
bond = netdev_priv(bond_dev);
580580
rcu_read_lock();
581581
curr_active = rcu_dereference(bond->curr_active_slave);
582+
if (!curr_active)
583+
goto out;
582584
real_dev = curr_active->dev;
583585

584586
if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP) {

0 commit comments

Comments
 (0)