В ядре Linux была устранена следующая уязвимость: Bluetooth: hci_sock: проверка длины события перед фильтрацией is_filtered_packet() считывает код события из skb->data[0] без предварительной проверки того, что skb непуст. Когда фильтр opcode настроен, он также считывает код команды opcode при смещениях 3 или 4, не проверяя, достаточно ли долго событие Command Complete или Command Status. hci_send_to_sock() вызывает фильтр перед тем, как hci_event_packet() проверяет заголовок события. Таким образом, искаженное событие, поставляемое контроллером или устройством vhci, может вызвать чтение out-of-bounds.
Храните незамаскированный код события для проверки кода операции. Значение маски необходимо для растрового изображения 64-битного события, но с его помощью можно идентифицировать псевдонимы событий команды выше 0x3f. В частности, Synchronous Train Complete (0x4f) рассматривался как Command Status (0x0f), хотя его полезная нагрузка не имеет операционного кода.
Отклонить фактические командные события, которые являются слишком короткими для инспектируемого поля. Урезанное событие команды не может соответствовать настроенному коду операции.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: Bluetooth: hci_sock: validate event length before filtering is_filtered_packet() reads the event code from skb->data[0] without first checking that the skb is nonempty. When an opcode filter is configured, it also reads the command opcode at offsets 3 or 4 without checking that a Command Complete or Command Status event is long enough. hci_send_to_sock() invokes the filter before hci_event_packet() validates the event header. A malformed event supplied by a controller or a vhci device can therefore cause an out-of-bounds read. Keep the unmasked event code for the opcode checks. The masked value is needed for the 64-bit event bitmap, but using it to identify command events aliases event codes above 0x3f. In particular, Synchronous Train Complete (0x4f) was treated as Command Status (0x0f) even though its payload has no opcode. Reject actual command events that are too short for the field being inspected. A truncated command event cannot match a configured opcode.