В ядре Linux устранена следующая уязвимость: NFSD: прекратить регистрацию с rpcbind после сбоя в listener_set nfsd_nl_listener_set_doit() вызывает svc_xprt_create_from_sa() один раз для каждого запрашиваемого слушателя и передает флаги 0, поэтому каждый слушатель регистрируется с rpcbind самостоятельно. Таким образом, rpcbind, который принимает соединение и никогда не отвечает, стоит один тайм-аут для каждой записи. С ограничением в 1024 записи запрос может удерживать nfsd_mutex в течение примерно 34 минут, что примерно в 17 раз превышает порог подвешенной задачи.
Достаточно одной неудачи, чтобы понять, что следующий звонок не будет лучше. Прочитайте svc_rpcb_failure_count () перед циклом создания и передайте SVC_SOCK_ANONYMOUS для остальной части запроса, как только счет движется.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: NFSD: stop registering with rpcbind after a failure in listener_set nfsd_nl_listener_set_doit() calls svc_xprt_create_from_sa() once for each requested listener and passes flags of 0, so every listener registers with rpcbind on its own. A rpcbind that accepts the connection and never replies therefore costs one timeout for each entry. With the cap of 1024 entries the request can hold nfsd_mutex for about 34 minutes, which is roughly 17 times the hung-task threshold. One failure is enough to know that the next call will not fare better. Read svc_rpcb_failure_count() before the create loop, and pass SVC_SOCK_ANONYMOUS for the rest of the request once the count moves.