CVE-2026-99366: nfsd: don't modify a session slot when replaying its cached reply

Published Nov 19, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

nfsd: don't modify a session slot when replaying its cached reply

nfsd4sequence() claims a session slot by setting NFSD4SLOTINUSE under nn->clientlock. A reply served from the slot's reply cache does not claim it, and that distinction lived only in cstate->status, which nfsd4sequence() set to nfserrreplaycache. Commit cc028a10a48c ("NFSD: Hoist status code encoding into XDR encoder functions") moved nfsd4proccompound()'s cstate->status assignment below the out: label, and the replay path's goto out was the one path that relied on skipping it. The test in nfsd4sequencedone() therefore no longer identifies a replay, and every replay now stores its reply and clears NFSD4SLOTINUSE as though it owned the slot.

NFSD4SLOTINUSE is the interlock: checkslotseqid() rejects every sequence id for a slot that is in use, before replaymatchescache() runs. A replay never sets it, so two replays can be in flight on the same slot at once. One can read slot->slcred under nn->clientlock while the other's completion frees and rebuilds it from the XDR encoder without that lock. Two completions can also collide with each other and release the same groupinfo twice. freesvccred() leaves cruid, crgid and crflavor intact, so the reader passes every earlier test in samecreds() and dereferences a NULL crgroupinfo. From a 6.12.91 production server:

BUG: kernel NULL pointer dereference, address: 0000000000000004 CPU: 63 UID: 0 PID: 39015 Comm: nfsd RIP: 0010:samecreds+0x38/0xa0 [nfsd] RDX: 0000000000000000 Call Trace: nfsd4sequence+0x6a8/0x910 [nfsd] nfsd4proccompound+0x345/0x670 [nfsd] nfsddispatch+0x100/0x220 [nfsd] svcprocesscommon+0x311/0x700 [sunrpc] svcprocess+0x131/0x1c0 [sunrpc] svcrecv+0x7ef/0x9c0 [sunrpc] nfsd+0xa3/0x100 [nfsd] Kernel panic - not syncing: Fatal exception

Since v6.14 a live session's slot table can shrink, and the unowned store becomes a use-after-free write. nfsd4sequence() defers the shrink while a slot is in use, but it tests NFSD4SLOTINUSE, which a replay does not set, so freesessionslots() can kfree() the slot the replay still holds in cstate->slot.

Record the claim in cstate->slotowned when nfsd4sequence() accepts a request and test that in nfsd4sequencedone(), so only the request that claimed the slot updates its cached reply and clears NFSD4SLOTINUSE. svcgenericinitrequest() zeroes the compound response before each request, so the flag starts clear.

Affected Software

3 affected componentsFixes available
linux/kernel>=5.10.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.61
6.18.61
linux/kernel>=6.19.0<7.3.2
7.3.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch cc028a10a48c

Event History

Nov 19, 2026
CVE Published
via MITRE·02:22 PM
Data Sourced
via MITRE·02:22 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203