В ядре Linux устранена следующая уязвимость:
libceph: используйте u32 для неотрицательных значений в ceph_monmap_decode()
Этот патч исправляет ненужные неявные преобразования, которые меняют подпись.
blob_len и num_mon в ceph_monmap_decode(). В настоящее время blob_len и num_mon являются (подписанными) переменными типа int. Они используются
для хранения значений, которые всегда неотрицательны и присваиваются в
ceph_decode_32_safe(), который предназначен для присвоения значений u32. оба
переменные впоследствии используются как беззнаковые значения, а значение
num_mon далее присваивается переменной monmap->num_mon, которая имеет тип u32.
Следовательно, обе переменные должны иметь тип u32. Это особенно
актуально для num_mon. Если значение, прочитанное из входящего сообщения, равно
очень большое, оно интерпретируется как отрицательное значение, и проверка на
num_mon > CEPH_MAX_MON его не улавливает.
Это приводит к попытке
выделить очень большой кусок памяти для monmap, что, скорее всего,
провалиться. В этом случае ненужная попытка выделить память
выполняется, и вместо -EINVAL возвращается -ENOMEM.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: libceph: Use u32 for non-negative values in ceph_monmap_decode() This patch fixes unnecessary implicit conversions that change signedness of blob_len and num_mon in ceph_monmap_decode(). Currently blob_len and num_mon are (signed) int variables. They are used to hold values that are always non-negative and get assigned in ceph_decode_32_safe(), which is meant to assign u32 values. Both variables are subsequently used as unsigned values, and the value of num_mon is further assigned to monmap->num_mon, which is of type u32. Therefore, both variables should be of type u32. This is especially relevant for num_mon. If the value read from the incoming message is very large, it is interpreted as a negative value, and the check for num_mon > CEPH_MAX_MON does not catch it. This leads to the attempt to allocate a very large chunk of memory for monmap, which will most likely fail. In this case, an unnecessary attempt to allocate memory is performed, and -ENOMEM is returned instead of -EINVAL.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.203
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.167
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.130
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.78
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.19
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.9
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
|
— | — |