+5
−3
Loading
stable inclusion from stable-v5.10.231 commit 5237a297ffd374a1c4157a53543b7a69d7bbbc03 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBEAFI CVE: CVE-2024-53173 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5237a297ffd374a1c4157a53543b7a69d7bbbc03 -------------------------------- [ Upstream commit 2fdb05dc0931250574f0cb0ebeb5ed8e20f4a889 ] Yang Erkun reports that when two threads are opening files at the same time, and are forced to abort before a reply is seen, then the call to nfs_release_seqid() in nfs4_opendata_free() can result in a use-after-free of the pointer to the defunct rpc task of the other thread. The fix is to ensure that if the RPC call is aborted before the call to nfs_wait_on_sequence() is complete, then we must call nfs_release_seqid() in nfs4_open_release() before the rpc_task is freed. Reported-by:Yang Erkun <yangerkun@huawei.com> Fixes: 24ac23ab ("NFSv4: Convert open() into an asynchronous RPC call") Reviewed-by:
Yang Erkun <yangerkun@huawei.com> Signed-off-by:
Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Li Lingfeng <lilingfeng3@huawei.com>