Skip to contentSkip to conversation

CVE-2022-50460: cifs: Fix xid leak in cifs_flock()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 1, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

cifs: Fix xid leak in cifs_flock()

If not flock, before return -ENOLCK, should free the xid, otherwise, the xid will be leaked.

The Linux kernel CVE team has assigned CVE-2022-50460 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 5.5 with commit d0677992d2af3d65f1c1c21de3323d09d4891537 and fixed in 5.10.152 with commit 2d08311aa3056a84bfdc09bc47777de6a9b16c30
	Issue introduced in 5.5 with commit d0677992d2af3d65f1c1c21de3323d09d4891537 and fixed in 5.15.76 with commit 8905d13b9ede4caa88c577faed832d6c7383f4fb
	Issue introduced in 5.5 with commit d0677992d2af3d65f1c1c21de3323d09d4891537 and fixed in 6.0.6 with commit f8c9b4a963fec5d0e37e3e8522bb19b0c28e1a73
	Issue introduced in 5.5 with commit d0677992d2af3d65f1c1c21de3323d09d4891537 and fixed in 6.1 with commit 575e079c782b9862ec2626403922d041a42e6ed6

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-50460

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/cifs/file.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/2d08311aa3056a84bfdc09bc47777de6a9b16c30
	https://git.kernel.org/stable/c/8905d13b9ede4caa88c577faed832d6c7383f4fb
	https://git.kernel.org/stable/c/f8c9b4a963fec5d0e37e3e8522bb19b0c28e1a73
	https://git.kernel.org/stable/c/575e079c782b9862ec2626403922d041a42e6ed6