Skip to contentSkip to conversation

CVE-2024-53685: ceph: give up on paths longer than PATH_MAX

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jan 11, 2025

lore
Share & tools
lore
#0 lore raw

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

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

ceph: give up on paths longer than PATH_MAX

If the full path to be built by ceph_mdsc_build_path() happens to be longer than PATH_MAX, then this function will enter an endless (retry) loop, effectively blocking the whole task. Most of the machine becomes unusable, making this a very simple and effective DoS vulnerability.

I cannot imagine why this retry was ever implemented, but it seems rather useless and harmful to me. Let's remove it and fail with ENAMETOOLONG instead.

The Linux kernel CVE team has assigned CVE-2024-53685 to this issue.

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

	Fixed in 6.6.70 with commit c47ed91156daf328601d02b58d52d9804da54108
	Fixed in 6.12.7 with commit 99a37ab76a315c8307eb5b0dc095d8ad9d8efeaa
	Fixed in 6.13-rc4 with commit 550f7ca98ee028a606aa75705a7e77b1bd11720f

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-2024-53685

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/ceph/mds_client.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/c47ed91156daf328601d02b58d52d9804da54108
	https://git.kernel.org/stable/c/99a37ab76a315c8307eb5b0dc095d8ad9d8efeaa
	https://git.kernel.org/stable/c/550f7ca98ee028a606aa75705a7e77b1bd11720f