Linux kernel use-after-free in NFS server client_has_openowners()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfsd: hold cl_lock in client_has_openowners()
client_has_openowners() walks clp->cl_openowners and reads so_stateids without clp->cl_lock. nfs4_put_stateowner() unhashes that openowner under cl_lock and then frees it, so a concurrent EXCHANGE_ID with mismatched creds can use-after-free the nfs4_openowner.
BUG: KASAN: slab-use-after-free in client_has_state+0x10a/0x140 fs/nfsd/nfs4state.c:3718 client_has_openowners() nfsd4_exchange_id nfsd4_proc_compound nfsd_dispatch svc_process
Take clp->cl_lock while client_has_openowners() walks the openowner list.
From the CVE record · Linux
The Linux kernel’s nfsd can access a freed NFSv4 openowner because client_has_openowners() walks the openowner list without holding cl_lock. A concurrent EXCHANGE_ID with mismatched credentials can trigger the use-after-free while another operation frees the openowner. The input does not specify authentication requirements or user interaction.
Operators running Linux kernels with the affected nfsd code should check their kernel vendor’s advisory; affected versions were not provided.