В ядре Linux была устранена следующая уязвимость: rpcrdma: arm rn_done перед публикацией уведомления rpcrdma_rn_register() вставляет rn в rd_xa с xa_alloc() перед хранением обратного вызова вызывающего абонента в rn->rn_done. Xarray делает rn доступным для rpcrdma_remove_one(), который ходит rd_xa и вызывает rn->rn_done(rn) для каждого зарегистрированного уведомления. Удаление устройства, которое участвует в новой регистрации, может наблюдать rn с rn_done по-прежнему NULL, потому что объекты уведомлений являются нулевыми, выделенными их владельцами, и вызывать через указатель функции NULL.
Магазин rn->rn_done до того, как xa_alloc() публикует rn. Заказ на стороне магазина и стороне загрузки затем гарантирует, что любой CPU, который находит rn в rd_xa, также наблюдает вооруженный вызов. rpcrdma_rn_unregister() рассматривает non-NULL rn_done как часовой для завершенной регистрации, поэтому ранний магазин не должен пережить неудачную регистрацию. Очистить rn_done снова, когда xa_alloc () выходит из строя.
Если бы он остался заданным, путь очистки с неудачным принятием вызвал бы rpcrdma_rn_unregister () на rn, который никогда не вставлялся, стирая несвязанный слот rd_xa и недотекая rd_kref.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: rpcrdma: arm rn_done before publishing the notification rpcrdma_rn_register() inserts @rn into rd_xa with xa_alloc() before storing the caller's callback in rn->rn_done. The xarray makes @rn reachable to rpcrdma_remove_one(), which walks rd_xa and invokes rn->rn_done(rn) for every registered notification. A device removal that races a fresh registration can therefore observe @rn with rn_done still NULL, because the notification objects are zero allocated by their owners, and call through a NULL function pointer. Store rn->rn_done before xa_alloc() publishes @rn. The xarray's store-side and load-side ordering then guarantees that any CPU which finds @rn in rd_xa also observes the armed callback. rpcrdma_rn_unregister() treats a non-NULL rn_done as the sentinel for a completed registration, so the early store must not survive a failed registration. Clear rn_done again when xa_alloc() fails. Were it left set, the failed-accept cleanup path would call rpcrdma_rn_unregister() on an @rn that was never inserted, erasing an unrelated rd_xa slot and underflowing rd_kref.
Уязвимые продукты 4
| Конфигурация | От (включительно) | До (исключительно) |
|---|---|---|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
6.12.111
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
6.18.51
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
7.2.5
|
|
Linux Linux_Kernel
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
|
6.11
|
7.3-rc1
|