Katalog CVE

CVE-2026-89689

Nieznane
Opublikowano: Przetłumaczono: NVD NIST

Streszczenie

W jądrze Linux w module nfsd wykryto podatność use-after-free w funkcji nfsd4_sequence(). Gdy mechanizm zmniejszania sesji (shrinker) obniży se_target_maxslots poniżej se_fchannel.maxreqs, funkcja free_session_slots() może zwolnić slot aktualnie używany przez klienta, ponieważ nie sprawdza seq->slotid ani flagi NFSD4_SLOT_INUSE. Prowadzi to do uszkodzenia pamięci poprzez zapis do zwolnionego bufora sl_data[].

Ocena ryzyka

Podatność może prowadzić do uszkodzenia pamięci jądra (use-after-free), a w konsekwencji do awarii systemu (panic jądra) lub potencjalnego wykonania dowolnego kodu w kontekście jądra. Dotyczy serwerów NFS z aktywnymi sesjami klientów NFSv4.1+.

Rekomendacja

Zaktualizuj jądro Linux do wersji zawierającej poprawkę, która sprawdza slotid bieżącego żądania względem granicy zmniejszania oraz skanuje sloty pod kątem flagi NFSD4_SLOT_INUSE przed zwolnieniem. Do czasu aktualizacji rozważ ograniczenie lub monitorowanie ruchu NFSv4.1+ na serwerach.

Inne podatności w Linux kernel nfsd

Zobacz wszystkie
Oryginalny opis (angielski, źródło NVD)

In the Linux kernel, the following vulnerability has been resolved: nfsd: don't free session slots that are still in use nfsd4_sequence() can free the very slot it is currently processing. When the session shrinker has reduced se_target_maxslots below se_fchannel.maxreqs, the shrink path checks three conditions before calling free_session_slots(): 1. se_target_maxslots < maxreqs (shrink was advertised) 2. slot->sl_generation == se_slot_gen (slot is up-to-date) 3. seq->maxslots <= se_target_maxslots (client acknowledges) However, seq->slotid is never checked against se_target_maxslots. A client using a slot in the range [se_target_maxslots, maxreqs) can satisfy all three conditions: its slot has the current generation (set by a prior SEQUENCE), and it sends sa_highest_slotid <= se_target_maxslots to acknowledge the reduction. free_session_slots() then kfrees every slot at index >= se_target_maxslots, including the caller's own slot. The function continues to write sl_seqid, sl_flags, sl_generation, and stores the dangling pointer in cstate->slot. Later, nfsd4_store_cache_entry() copies up to maxresp_cached bytes of the compound reply into the freed sl_data[] array, corrupting whatever slab object now occupies that address. Additionally, a concurrent thread processing SEQUENCE on a different high-numbered slot can have its slot freed out from under it. NFSD4_SLOT_INUSE is set under nn->client_lock before the lock is released, so any concurrent thread past SEQUENCE will have its slot marked. However, free_session_slots() does not check NFSD4_SLOT_INUSE before freeing. Fix both problems by: 1. Checking that the current request's slotid is below the shrink boundary. 2. Scanning slots in the to-be-freed range for NFSD4_SLOT_INUSE and deferring the shrink if any are active.

Dane podatności pochodzą z NVD (NIST) · CISA KEV · EPSS