Skip to content

Commit d20bd37

Browse files
committed
Merge: mlxsw: spectrum_acl_tcam: Fix possible use-after-free during activity update
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4339 JIRA: https://issues.redhat.com/browse/RHEL-37006 CVE: CVE-2024-35855 Commits: ``` 79b5b4b ("mlxsw: spectrum_acl_tcam: Fix possible use-after-free during activity update") ``` Signed-off-by: Ivan Vecera <ivecera@redhat.com> Approved-by: José Ignacio Tornos Martínez <jtornosm@redhat.com> Approved-by: Petr Oros <poros@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents d67c66c + b251000 commit d20bd37

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,8 +1157,14 @@ mlxsw_sp_acl_tcam_ventry_activity_get(struct mlxsw_sp *mlxsw_sp,
11571157
struct mlxsw_sp_acl_tcam_ventry *ventry,
11581158
bool *activity)
11591159
{
1160-
return mlxsw_sp_acl_tcam_entry_activity_get(mlxsw_sp,
1161-
ventry->entry, activity);
1160+
struct mlxsw_sp_acl_tcam_vregion *vregion = ventry->vchunk->vregion;
1161+
int err;
1162+
1163+
mutex_lock(&vregion->lock);
1164+
err = mlxsw_sp_acl_tcam_entry_activity_get(mlxsw_sp, ventry->entry,
1165+
activity);
1166+
mutex_unlock(&vregion->lock);
1167+
return err;
11621168
}
11631169

11641170
static int

0 commit comments

Comments
 (0)