В ядре Linux устранена следующая уязвимость:
платформа/x86: intel-hid: защитить обработчик уведомлений ACPI от рекурсии
С момента фиксации e2ffcda16290 («ACPI:OSL: Разрешить запуск обработчиков Notify()» на
все процессоры") Обработчики уведомлений ACPI, такие как intel-hid notify_handler(), могут
работать на нескольких ядрах ЦП, соревнующихся друг с другом. На кабриолетах и съемных автомобилях (соответствует шасси DMI типа 31 и 32 дюйма).
dmi_auto_add_switch[]) зарегистрировано устройство ввода SW_TABLET_MODE
лениво из notify_handler() при первом событии режима планшета, через
intel_hid_switches_setup(). Когда два таких события соревнуются на разных процессорах
оба могут пройти проверку !priv->switches и зарегистрировать priv->switches.
устройство ввода дважды, что приводит к дублированию записи sysfs и последующему
Разыменование NULL-указателя.
Это тот же класс ошибок, исправленный коммитом e075c3b13a0a ("platform/x86:
intel-vbtn: защитить обработчик уведомлений ACPI от рекурсии") для
родственный драйвер Intel-VBTN. Защитите intel-hid notify_handler() от гонок с самим собой с помощью мьютекса
чтобы это исправить.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: platform/x86: intel-hid: Protect ACPI notify handler against recursion Since commit e2ffcda16290 ("ACPI: OSL: Allow Notify () handlers to run on all CPUs") ACPI notify handlers like the intel-hid notify_handler() may run on multiple CPU cores racing with themselves. On convertibles and detachables (matched by DMI chassis-type 31 and 32 in dmi_auto_add_switch[]) the SW_TABLET_MODE input device is registered lazily from notify_handler() on the first tablet-mode event, via intel_hid_switches_setup(). When two such events race on different CPUs both can pass the !priv->switches check and register the priv->switches input device twice, resulting in a duplicate sysfs entry and a subsequent NULL pointer dereference. This is the same class of bug fixed by commit e075c3b13a0a ("platform/x86: intel-vbtn: Protect ACPI notify handler against recursion") for the sibling intel-vbtn driver. Protect intel-hid notify_handler() from racing with itself with a mutex to fix this.