В ядре Linux устранена следующая уязвимость:
RDMA/mlx5: исправление ошибки пути в mlx5_ib_dev_res_srq_init().
mlx5_ib_dev_res_srq_init() выделяет два SRQ: s0 и s1. Когда
ib_create_srq() завершается неудачей для s1, ветвь ошибки уничтожает s0, но падает
и безоговорочно назначает освобожденные s0 и ERR_PTR s1
devr->s0 и devr->s1. Это приводит к нескольким проблемам: проверка быстрого пути без блокировок.
"если (devr->s1) вернет 0;" и рассматривает ERR_PTR как уже инициализированный;
пользователи в mlx5_ib_create_qp() разыменовывают освобожденный SRQ или ERR_PTR через
to_msrq(devr->s0)->msrq.srqn; и разыменования mlx5_ib_dev_res_cleanup()
ERR_PTR и дважды освобождает s0 при демонтаже.
Исправьте это, добавив тот же `goto unlock` в путь сбоя s1.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix error path fall-through in mlx5_ib_dev_res_srq_init() mlx5_ib_dev_res_srq_init() allocates two SRQs, s0 and s1. When ib_create_srq() fails for s1, the error branch destroys s0 but falls through and unconditionally assigns the freed s0 and the ERR_PTR s1 to devr->s0 and devr->s1. This leads to several problems: the lock-free fast path checks "if (devr->s1) return 0;" and treats the ERR_PTR as already initialised; users in mlx5_ib_create_qp() dereference the freed SRQ or ERR_PTR via to_msrq(devr->s0)->msrq.srqn; and mlx5_ib_dev_res_cleanup() dereferences the ERR_PTR and double-frees s0 on teardown. Fix by adding the same `goto unlock` in the s1 failure path.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 6
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.6.64
|
6.6.140
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
6.12.88
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.30
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.0.7
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.1:rc2:*:*:*:*:*:*
|
— | — |