В ядре Linux устранена следующая уязвимость:
netfilter: nf_conntrack_h323: исправлено чтение OOB в decode_choice(). В decode_choice() проверка границ перед get_len() использует
переменная `len`, которая все еще равна 0 с момента ее инициализации в верхней части
функция:
беззнаковый тип int, ext, len = 0;
...
if (ext || (son->attr & OPEN)) {
BYTE_ALIGN (бс);
if (nf_h323_error_boundary(bs, len, 0)) /* len здесь равен 0 */
вернуть H323_ERROR_BOUND;
Лен = get_len (BS); /* внеочередное чтение */
Когда битовый поток точно израсходован (bs->cur == bs->end), проверка
nf_h323_error_boundary(bs, 0, 0) оценивается как (bs->cur + 0 > bs->end),
что неверно. Последующий вызов get_len() затем разыменовывает
*bs->cur++, чтение на 1 байт после конца буфера.
Если этот байт
установлен бит 7, get_len() также считывает второй байт. Это можно запустить удаленно, отправив созданное сообщение Q.931 SETUP.
с информационным элементом пользователь-пользователь, содержащим ровно 2 байта
Данные в кодировке PER ({0x08, 0x00}) на порт 1720 через брандмауэр с
помощник nf_conntrack_h323 активен. Декодер полностью потребляет
PER до достижения этого пути кода, в результате чего образуется 1-2-байтовый буфер.
Чтение переполнения буфера кучи подтверждено AddressSanitizer. Исправьте это, проверив 2 байта (максимум, который может прочитать get_len())
вместо неинициализированного `len`. Это соответствует шаблону, используемому в
каждый второй сайт вызова get_len() в том же файле, где вызывающая сторона
проверяет наличие 2 байтов доступных данных перед вызовом get_len().
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_conntrack_h323: fix OOB read in decode_choice() In decode_choice(), the boundary check before get_len() uses the variable `len`, which is still 0 from its initialization at the top of the function: unsigned int type, ext, len = 0; ... if (ext || (son->attr & OPEN)) { BYTE_ALIGN(bs); if (nf_h323_error_boundary(bs, len, 0)) /* len is 0 here */ return H323_ERROR_BOUND; len = get_len(bs); /* OOB read */ When the bitstream is exactly consumed (bs->cur == bs->end), the check nf_h323_error_boundary(bs, 0, 0) evaluates to (bs->cur + 0 > bs->end), which is false. The subsequent get_len() call then dereferences *bs->cur++, reading 1 byte past the end of the buffer. If that byte has bit 7 set, get_len() reads a second byte as well. This can be triggered remotely by sending a crafted Q.931 SETUP message with a User-User Information Element containing exactly 2 bytes of PER-encoded data ({0x08, 0x00}) to port 1720 through a firewall with the nf_conntrack_h323 helper active. The decoder fully consumes the PER buffer before reaching this code path, resulting in a 1-2 byte heap-buffer-overflow read confirmed by AddressSanitizer. Fix this by checking for 2 bytes (the maximum that get_len() may read) instead of the uninitialized `len`. This matches the pattern used at every other get_len() call site in the same file, where the caller checks for 2 bytes of available data before calling get_len().
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 15
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.15.1
|
5.10.252
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.202
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.165
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.128
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.75
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.16
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
6.19.6
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:-:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc4:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc5:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc6:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc7:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc8:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:4.15:rc9:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
|
— | — |