В ядре Linux была устранена следующая уязвимость: Ввод: evdev - нулевой absinfo перед частичной копией в EVIOCSABS The EVIOCSABS пользователь поставил ioctl размер в неинициализированную struct input_absinfo: если (copy_from_user(&abs, p, min_t(size_t, sizeof(struct input_absinfo)))) The размер полностью контролируется _IOC_SIZE) Короткий размер оставляет следующую часть структуры, держащую все, что было на стеке ядра, и вся структура затем хранится в устройстве: dev->absinfo[t] abs; EVIOCGABS передает это обратно в пользовательское пространство, раскрывая устаревшие байты стека. В настоящее время очищается только поле разрешения, которое охватывает устаревший макет структуры, но не произвольно короткий размер. Ноль структуры перед копией, чтобы любая часть, не предоставленная абонентом, считывалась как ноль.
Существующая фиксация разрешения сохраняется, так как она также обрабатывает размер, который частично перекрывает это поле.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Input: evdev - zero absinfo before partial copy in EVIOCSABS The EVIOCSABS handler copies at most the user supplied ioctl size into an uninitialized on-stack struct input_absinfo: if (copy_from_user(&abs, p, min_t(size_t, size, sizeof(struct input_absinfo)))) The size comes from _IOC_SIZE() of the ioctl command and is therefore fully controlled by userspace. A short size leaves the trailing part of the structure holding whatever was on the kernel stack, and the whole structure is then stored into the device: dev->absinfo[t] = abs; EVIOCGABS hands that back to userspace, disclosing the stale stack bytes. Only the resolution field is currently cleared, which covers the legacy struct layout but not an arbitrarily short size. Zero the structure before the copy so any part not supplied by the caller reads back as zero. The existing resolution fixup is kept, since it also handles a size that partially overlaps that field.