Ad

CVE-2024-42096

MEDIUM CVSS 3.1: 5,5 EPSS 0.24%
Обновлено 15 октября 2026
Linux
Параметр Значение
CVSS 5,5 (MEDIUM)
Уязвимые версии 4.20 — 6.9.8
Устранено в версии 4.19.317
Тип уязвимости CWE-908 (Использование неинициализированного ресурса)
Поставщик Linux
Публичный эксплойт Нет

В ядре Linux была устранена следующая уязвимость: функция x86: прекратить играть в стековые игры в profile_pc() The 'profile_pc () используется для профилирования на основе таймера, что на самом деле не все, что актуально, но это также приводит к тому, что предположения, основанные на макете стека, не обязательно действительны. В принципе, код пытается учитывать время, проведенное в спинлоках, для вызывающего абонента, а не для спинлока, и хотя я поддерживаю это как концепцию, это не стоит сложности кода или предупреждений KASAN, когда в наши дни не делается серьезного профилирования с использованием таймеров в любом случае. И код действительно зависит от макета стека, что верно только в самых простых случаях.

Мы потеряли комментарий в какой-то момент (я думаю, когда 32-разрядный и 64-разрядный код был унифицирован), но раньше он говорил: Assume функция блокировки кода вызывает либо отсутствие рамки стека, либо копию флагов из PUSHF. что объясняет, почему он просто слепо загружает слово или два прямо с указателя стека, а затем минимально смотрит на значения, чтобы просто проверить, могут ли они быть флагами или возвращает ПК: Eflags всегда имеет значение. Это вызывает несчастье KASAN, о котором годами сообщали Syzkaller [1] и другие [2]. Без какой-либо реальной практической причины для этого больше, просто удалите код.

Just for historical interest, here's some background commits relating to this code from 2006: 0cb91a229364 ("i386: Account spinlocks to the caller during profiling for !FP kernels") 31679f38d886 ("Simplify profile_pc on x86-64") and a code unification from 2009: ef4512882dbe ("x86: time_32/64.c unify profile_pc") but the basics of this thing actually goes back to before the git tree.

Показать оригинальное описание (EN)

In the Linux kernel, the following vulnerability has been resolved: x86: stop playing stack games in profile_pc() The 'profile_pc()' function is used for timer-based profiling, which isn't really all that relevant any more to begin with, but it also ends up making assumptions based on the stack layout that aren't necessarily valid. Basically, the code tries to account the time spent in spinlocks to the caller rather than the spinlock, and while I support that as a concept, it's not worth the code complexity or the KASAN warnings when no serious profiling is done using timers anyway these days. And the code really does depend on stack layout that is only true in the simplest of cases. We've lost the comment at some point (I think when the 32-bit and 64-bit code was unified), but it used to say: Assume the lock function has either no stack frame or a copy of eflags from PUSHF. which explains why it just blindly loads a word or two straight off the stack pointer and then takes a minimal look at the values to just check if they might be eflags or the return pc: Eflags always has bits 22 and up cleared unlike kernel addresses but that basic stack layout assumption assumes that there isn't any lock debugging etc going on that would complicate the code and cause a stack frame. It causes KASAN unhappiness reported for years by syzkaller [1] and others [2]. With no real practical reason for this any more, just remove the code. Just for historical interest, here's some background commits relating to this code from 2006: 0cb91a229364 ("i386: Account spinlocks to the caller during profiling for !FP kernels") 31679f38d886 ("Simplify profile_pc on x86-64") and a code unification from 2009: ef4512882dbe ("x86: time_32/64.c unify profile_pc") but the basics of this thing actually goes back to before the git tree.

Характеристики атаки

Способ атаки
Локальный
Нужен локальный доступ
Сложность
Низкая
Легко эксплуатировать
Нужны права
Низкие
Нужны базовые права
Участие пользователя
Не требуется
Не нужно действие пользователя

Последствия

Конфиденциальность
Нет
Нет утечки данных
Целостность
Нет
Нет модификации данных
Доступность
Высокое
Полный отказ в обслуживании

Строка CVSS v3.1

Уязвимые продукты 12

Конфигурация От (включительно) До (исключительно)
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
— 4.19.317
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
4.20 5.4.279
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
5.5 5.10.221
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
5.11 5.15.162
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
5.16 6.1.97
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.2 6.6.37
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
6.7 6.9.8
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.10:rc1:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.10:rc2:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.10:rc3:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.10:rc4:*:*:*:*:*:*
— —
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:6.10:rc5:*:*:*:*:*:*
— —