diff options
author | Olga Kornievskaia <[email protected]> | 2024-10-04 18:04:03 -0400 |
---|---|---|
committer | Chuck Lever <[email protected]> | 2024-10-05 15:44:25 -0400 |
commit | c88c150a467fcb670a1608e2272beeee3e86df6e (patch) | |
tree | 056f5666ded0d381bc29d45f53c483e21aee1f47 /rust/helpers/mutex.c | |
parent | 53e4e17557049d7688ca9dadeae80864d40cf0b7 (diff) |
nfsd: fix possible badness in FREE_STATEID
When multiple FREE_STATEIDs are sent for the same delegation stateid,
it can lead to a possible either use-after-free or counter refcount
underflow errors.
In nfsd4_free_stateid() under the client lock we find a delegation
stateid, however the code drops the lock before calling nfs4_put_stid(),
that allows another FREE_STATE to find the stateid again. The first one
will proceed to then free the stateid which leads to either
use-after-free or decrementing already zeroed counter.
Fixes: 3f29cc82a84c ("nfsd: split sc_status out of sc_type")
Signed-off-by: Olga Kornievskaia <[email protected]>
Reviewed-by: Benjamin Coddington <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
0 files changed, 0 insertions, 0 deletions