Skip to content

Commit 879f95e

Browse files
committed
Merge: CVE-2024-44990: bonding: fix null pointer deref in bond_ipsec_offload_ok
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5163 JIRA: https://issues.redhat.com/browse/RHEL-57235 CVE: CVE-2024-44990 ``` bonding: fix null pointer deref in bond_ipsec_offload_ok 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 <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> (cherry picked from commit 95c90e4) ``` Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com> Approved-by: Hangbin Liu <haliu@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents 93b6218 + 8644229 commit 879f95e

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
@@ -602,6 +602,8 @@ static bool bond_ipsec_offload_ok(struct sk_buff *skb, struct xfrm_state *xs)
602602
bond = netdev_priv(bond_dev);
603603
rcu_read_lock();
604604
curr_active = rcu_dereference(bond->curr_active_slave);
605+
if (!curr_active)
606+
goto out;
605607
real_dev = curr_active->dev;
606608

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

0 commit comments

Comments
 (0)