В ядре Linux была устранена следующая уязвимость: SUNRPC: трассировка принятого транспорта перед его публикацией svc_handle_xprt() публикует вновь принятый транспорт перед его отслеживанием. svc_add_new_temp_xprt() помещает транспорт на sv_tempsocks и очищает XPT_BUSY, поэтому другой поток nfsd может декьюировать его сразу. Если узел уже закрыл соединение, этот поток запускает svc_delete_xprt(), который удаляет ссылку на список, единственную ссылку, которую держит новый транспорт. trace_svc_xprt_accept() затем читает адреса транспорта и пространство имен сети из свободной памяти. Перед публикацией принимающий поток владеет исключительно транспортом: XPT_BUSY по-прежнему устанавливается из svc_xprt_init(), а транспорт отсутствует в списке.
Выпусти точку трассировки. [ cel: трассировка перед публикацией вместо дополнительной ссылки ]
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: SUNRPC: trace an accepted transport before publishing it svc_handle_xprt() publishes a newly accepted transport before tracing it. svc_add_new_temp_xprt() places the transport on sv_tempsocks and clears XPT_BUSY, so another nfsd thread can dequeue it at once. If the peer has already closed the connection, that thread runs svc_delete_xprt(), which drops the list reference, the only reference the new transport holds. trace_svc_xprt_accept() then reads the transport's addresses and network namespace from freed memory. Before publication the accepting thread owns the transport exclusively: XPT_BUSY is still set from svc_xprt_init() and the transport is on no list. Emit the tracepoint there. [ cel: trace before publication instead of taking an extra reference ]