В ядре Linux была устранена следующая уязвимость: NFSD: Fix out-of-bounds читается в дампе rpc_status nfsd_nl_rpc_status_get_dumpit() загружает args->opcnt и args->ops по отдельности, затем проходит операции[], прежде чем перепроверить rq_status_counter. COMPOUND, который завершает между двумя нагрузками, запускает nfsd4_release_compoundargs (), который обнуляет opcnt и указывает ops обратно на встроенный массив с восемью входами. Дамп, который уже отобрал opcnt из 200, зажимает его в шестнадцать слотов в rq_opnum, затем индексирует iops [0..15]. iops является последним членом структуры nfsd4_compoundargs и rq_argp, который выделяется именно в этом размере, поэтому ход заканчивается в конце распределения. Отслеживающая перепроверка отбрасывает отобранные данные, но чтение уже произошло. NFSD_CMD_RPC_STATUS_GET не имеет GENL_ADMIN_PERM, поэтому непривилегированный локальный пользователь может повторить дамп на занятом сервере, пока он не приземлится в окне.
Образец opcnt и ops в местных жителей, а затем закончить счетчик перепроверку, прежде чем dereferencing ops. Неизменный счетчик означает, что оба исходили из одного и того же COMPOUND, где opcnt не может превышать того, что имеет ops.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: NFSD: Fix out-of-bounds read in the rpc_status dump nfsd_nl_rpc_status_get_dumpit() loads args->opcnt and args->ops separately, then walks ops[] before rechecking rq_status_counter. A COMPOUND that completes between the two loads runs nfsd4_release_compoundargs(), which zeroes opcnt and points ops back at the eight-entry inline array. A dump that already sampled an opcnt of 200 clamps it to the sixteen slots in rq_opnum, then indexes iops[0..15]. iops is the last member of struct nfsd4_compoundargs and rq_argp is allocated at exactly that size, so the walk runs off the end of the allocation. The trailing recheck discards the sampled data, but the read has already happened. NFSD_CMD_RPC_STATUS_GET carries no GENL_ADMIN_PERM, so an unprivileged local user can repeat the dump against a busy server until it lands in the window. Sample opcnt and ops into locals, then finish the counter recheck before dereferencing ops. An unchanged counter means both came from the same COMPOUND, where opcnt cannot exceed what ops holds.