В ядре Linux устранена следующая уязвимость:
net: macb: перетасуйте кольцо передачи перед включением передачи
Цюаньян заметил, что при использовании корневой файловой системы NFS на плате AMD ZynqMp
rootfs может потребоваться длительное время для восстановления после приостановки. В ходе расследования было установлено, что проблема возникла из-за
проблема в драйвере macb. Согласно Zynq UltraScale TRM [1], когда передача отключена,
указатель очереди буфера передачи сбрасывается и указывает на адрес
указывается регистром базового адреса очереди буфера передачи.
В текущей реализации код просто сбрасывает `queue->tx_head`
и `queue->tx_tail` на '0'. Этот подход решает несколько проблем:
- Пакеты, уже поставленные в очередь в кольце передачи, теряются без уведомления.
что приводит к утечкам памяти, поскольку связанные skbs не могут быть освобождены.
- Возможен одновременный доступ для записи в `queue->tx_head` и `queue->tx_tail`.
происходят из `macb_tx_poll()` или `macb_start_xmit()`, когда эти значения
сбрасываются в «0».
- Передача может застрять на уже отправленном пакете.
out с установленным битом «TX_USED», но еще не обработан. Однако,
из-за манипуляций с «queue->tx_head» и «queue->tx_tail»,
`macb_tx_poll()` ошибочно предполагает, что нет пакетов для обработки.
потому что `queue->tx_head == очередь->tx_tail`.
Этот вопрос решается только когда новый пакет помещается в эту позицию. Это основная причина длительное время восстановления, наблюдаемое для корневой файловой системы NFS. Чтобы решить эту проблему, перетасуйте кольцо tx и массив tx skb так, чтобы первый неотправленный пакет располагается в начале кольца передачи.
Кроме того, убедитесь, что обновления `queue->tx_head` и
`queue->tx_tail` должным образом защищены соответствующей блокировкой.
[1] https://docs.amd.com/v/u/en-US/ug1085-zynq-ultrascale-trm
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: macb: Shuffle the tx ring before enabling tx Quanyang observed that when using an NFS rootfs on an AMD ZynqMp board, the rootfs may take an extended time to recover after a suspend. Upon investigation, it was determined that the issue originates from a problem in the macb driver. According to the Zynq UltraScale TRM [1], when transmit is disabled, the transmit buffer queue pointer resets to point to the address specified by the transmit buffer queue base address register. In the current implementation, the code merely resets `queue->tx_head` and `queue->tx_tail` to '0'. This approach presents several issues: - Packets already queued in the tx ring are silently lost, leading to memory leaks since the associated skbs cannot be released. - Concurrent write access to `queue->tx_head` and `queue->tx_tail` may occur from `macb_tx_poll()` or `macb_start_xmit()` when these values are reset to '0'. - The transmission may become stuck on a packet that has already been sent out, with its 'TX_USED' bit set, but has not yet been processed. However, due to the manipulation of 'queue->tx_head' and 'queue->tx_tail', `macb_tx_poll()` incorrectly assumes there are no packets to handle because `queue->tx_head == queue->tx_tail`. This issue is only resolved when a new packet is placed at this position. This is the root cause of the prolonged recovery time observed for the NFS root filesystem. To resolve this issue, shuffle the tx ring and tx skb array so that the first unsent packet is positioned at the start of the tx ring. Additionally, ensure that updates to `queue->tx_head` and `queue->tx_tail` are properly protected with the appropriate lock. [1] https://docs.amd.com/v/u/en-US/ug1085-zynq-ultrascale-trm
Характеристики атаки
Последствия
Строка CVSS v3.1
Тип уязвимости (CWE)
Уязвимые продукты 5
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.1.165
|
6.1.167
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.6.128
|
6.6.130
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.12.75
|
6.12.78
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.18.16
|
6.18.20
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.19.6
|
6.19.9
|