В ядре Linux устранена следующая уязвимость:
трассировка: предотвращение чтения за пределами границ при сопоставлении глобальных объектов. Строковые поля событий не обязательно завершаются NUL, поэтому фильтр
функции предиката (filter_pred_string(), filter_pred_strloc() и
filter_pred_strrelloc()) передает длину поля в соответствие регулярному выражению
обратные вызовы, и средства сопоставления с учетом длины учитывают это.
regex_match_glob() был исключением: он игнорировал длину и вызывал
glob_match(), который сканирует строку до тех пор, пока она не достигнет нулевого байта. Некоторые
Строковые поля не завершаются NUL.
Одним из примеров является динамический char
массив точек трассировки пространства имен xfs_*, который копируется без
конечный NUL. Для такого поля сопоставление глобусов считывается после конца
поле события, вызывающее чтение плиты KASAN за пределами границ
glob_match(), доступный через regex_match_glob() и filter_match_preds()
из точки трассировки xfs_lookup. Добавьте glob_match_len() с ограниченной длиной и используйте его из regex_match_glob().
поэтому сопоставление глобусов всегда останавливается на границе поля.
Соответствующий цикл
учитывается в общем помощнике, поэтому glob_match() сохраняет свое поведение.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: tracing: Prevent out-of-bounds read in glob matching String event fields are not necessarily NUL-terminated, so the filter predicate functions (filter_pred_string(), filter_pred_strloc() and filter_pred_strrelloc()) pass the field length to the regex match callbacks, and the length-aware matchers honour it. regex_match_glob() was the exception: it ignored the length and called glob_match(), which scans the string until it hits a NUL byte. Some string fields are not NUL-terminated. One example is the dynamic char array of the xfs_* namespace tracepoints, which is copied without a trailing NUL. For such a field, glob matching reads past the end of the event field, causing a KASAN slab-out-of-bounds read in glob_match(), reached via regex_match_glob() and filter_match_preds() from the xfs_lookup tracepoint. Add a length-bounded glob_match_len() and use it from regex_match_glob() so glob matching always stops at the field boundary. The matching loop is factored into a shared helper so glob_match() keeps its behaviour.
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 9
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
4.10
|
5.10.261
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.11
|
5.15.212
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
5.16
|
6.1.178
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.2
|
6.6.145
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.7
|
6.12.96
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.13
|
6.18.39
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19
|
7.1.4
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.2:rc1:*:*:*:*:*:*
|
— | — |
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:7.2:rc2:*:*:*:*:*:*
|
— | — |