Ad

CVE-2026-89460

NONE EPSS 0.17%
Обновлено 11 сентября 2026
IBM
Параметр Значение
Поставщик IBM
Публичный эксплойт Нет

В ядре Linux устранена следующая уязвимость: s390/cpum_cf: обработка горячего подключения процессора с помощью обратных вызовов подготовки/неактивности. Команда «perf stat -e Cycles -- <команда>» приводит к сбою ядра когда процессоры добавляются в горячем режиме во время этого запуска. Основная причина - сначала выделение структуры cpu_cf_events. инициализация событий.

Распределение является динамическим и первым событие, имеющее контекст задачи, создает такую структуру для каждый подключенный процессор. Этого недостаточно. Процессоры могут быть отключены от сети во время создания события и может быть установлен онлайн во время время выполнения perf.

Например команды # echo 0 > /sys/devices/system/cpu/cpu1/online # perf stat -e Cycles -i -- Stress-ng -t10s --matrix X # спать 1 # echo 1 > /sys/devices/system/cpu/cpu1/online создайте событие для процессоров 0,2-X. Поскольку события создаются с помощью контекст задачи, планировщик в конечном итоге запланирует программу на ЦП1. Этот ЦП не создал и не инициализировал никаких Инфраструктура событий ЦП, поскольку этот ЦП в данный момент не был в сети. перф-вызова.

Таким образом, когда планировщик запускает стресс-нг на CPU1 функция cpumf_pmu_add() ссылается на NULL-указатель: структура cpu_cf_events *cpuhw = this_cpu_cfhw(); Этот вызов функции вызывается после завершения задачи стресс-нг. стал работоспособным на CPU1. И this_cpu_cfhw() возвращает NULL. В результате паника: Невозможно обработать разыменование указателя ядра в адресном пространстве виртуального ядра.

Неверный адрес: 0000000000000000 TEID: 0000000000000483 .... Krnl PSW: 0404d00180000000 000003ef8291fd0c (cpumf_pmu_add+0x3c/0x80) .... Отслеживание вызова: [<000003ef8291fd0c>] cpumf_pmu_add+0x3c/0x80 [<000003ef82bb5e3e>] event_sched_in+0xae/0x190 [<000003ef82bb60d6>] merge_sched_in+0x1b6/0x390 [<000003ef82bb65b8>] visit_groups_merge.constprop.0.isra.0+0x308/0x5b0 [<000003ef82bb689a>] pmu_groups_sched_in+0x3a/0x50 [<000003ef82bb6a30>] ctx_sched_in+0x180/0x260 [<000003ef82bb780c>] perf_event_context_sched_in+0x11c/0x2d0 [<000003ef82bb79ee>] __perf_event_task_sched_in+0x2e/0xc0 [<000003ef82994834>] Finish_task_switch.isra.0+0x1a4/0x250 ....

Адрес последнего события прерывания: [<000003ef8291f1d8>] this_cpu_cfhw+0x38/0x40 Проблема возникает только в контексте каждой задачи, когда средство CPUMF используется, и планировщик выбирает случайный процессор для запуска такого процесса. Планировщик включает инфраструктуру CPUMF через обратный вызов PMU. функции pmu::add() и pmu::del(). Представьте пару обратного вызова «подготовка/отключение горячего подключения» ЦП, которая создает и удаляет данные счетчика каждого ЦП, пока ЦП находится в автономном режиме.

Посчитайте пользователи, которые отслеживают каждый процессор (cpu == -1), то есть perf_event_open() события с контекстом задачи и сеансами устройства /dev/hwctr в новом счетчик cpu_cf_root::tskcnt, защищенный pmc_reserve_mutex. Это гарантирует доступность инфраструктуры в любое время. новый ЦП выбирается для запуска процесса контекста каждой задачи. В cpum_cf_free_root() и cpum_cf_free_cpu() убедитесь, что ссылка указатель на структуры данных устанавливается в NULL перед освобождением данных чтобы предотвратить доступ обработчиков прерываний к устаревшим данным. [gor@linux.ibm.com: изменить сообщение о фиксации]

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

In the Linux kernel, the following vulnerability has been resolved: s390/cpum_cf: Handle CPU hotplug via prepare/dead callbacks The command 'perf stat -e cycles -- <command>' crashes the kernel when CPUs are hotplug added during that run. Root cause is the allocation of struct cpu_cf_events at first event initialization. The allocation is dynamic and the first event that has task context creates such a structure for each online CPU. This is not sufficient. CPUs may be offline during event creation and can be set online during the perf run time. For example commands # echo 0 > /sys/devices/system/cpu/cpu1/online # perf stat -e cycles -i -- stress-ng -t10s --matrix X # sleep 1 # echo 1 > /sys/devices/system/cpu/cpu1/online create an event for CPUs 0,2-X. Since the events are created with task-context, the scheduler will eventually schedule the program on CPU1. This CPU has not created and initialized any per CPU event infrastructure as that CPU was not online at the time of the perf invocation. Thus when the scheduler runs stress-ng on CPU1, the function cpumf_pmu_add() refers to a NULL pointer: struct cpu_cf_events *cpuhw = this_cpu_cfhw(); This function call is invoked after the task stress-ng has been made runnable on CPU1. And this_cpu_cfhw() returns NULL. The result is a panic: Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 0000000000000000 TEID: 0000000000000483 .... Krnl PSW : 0404d00180000000 000003ef8291fd0c (cpumf_pmu_add+0x3c/0x80) .... Call Trace: [<000003ef8291fd0c>] cpumf_pmu_add+0x3c/0x80 [<000003ef82bb5e3e>] event_sched_in+0xae/0x190 [<000003ef82bb60d6>] merge_sched_in+0x1b6/0x390 [<000003ef82bb65b8>] visit_groups_merge.constprop.0.isra.0+0x308/0x5b0 [<000003ef82bb689a>] pmu_groups_sched_in+0x3a/0x50 [<000003ef82bb6a30>] ctx_sched_in+0x180/0x260 [<000003ef82bb780c>] perf_event_context_sched_in+0x11c/0x2d0 [<000003ef82bb79ee>] __perf_event_task_sched_in+0x2e/0xc0 [<000003ef82994834>] finish_task_switch.isra.0+0x1a4/0x250 .... Last Breaking-Event-Address: [<000003ef8291f1d8>] this_cpu_cfhw+0x38/0x40 The issue arises only in per-task context when the CPUMF facility is used and the scheduler picks a random CPU for such a process to run on. The scheduler enables the CPUMF infrastructure via PMU callback functions pmu::add() and pmu::del(). Introduce a CPU hotplug prepare/dead callback pair which creates and removes the per CPU counter data while the CPU is offline. Count the users which track every CPU (cpu == -1), that is perf_event_open() events with task context and /dev/hwctr device sessions, in the new counter cpu_cf_root::tskcnt, protected by pmc_reserve_mutex. This ensures the infrastructure is available when new CPU is selected to run the per-task context process. In cpum_cf_free_root() and cpum_cf_free_cpu() ensure the reference pointer to data structures is set to NULL before the data is freed to prevent interrupt handlers to access stale data. [gor@linux.ibm.com: change commit message]