Skip to contentSkip to conversation

CVE-2025-38411: netfs: Fix double put of request

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 25, 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:

netfs: Fix double put of request

If a netfs request finishes during the pause loop, it will have the ref that belongs to the IN_PROGRESS flag removed at that point - however, if it then goes to the final wait loop, that will *also* put the ref because it sees that the IN_PROGRESS flag is clear and incorrectly assumes that this happened when it called the collector.

In fact, since IN_PROGRESS is clear, we shouldn't call the collector again since it's done all the cleanup, such as calling ->ki_complete().

Fix this by making netfs_collect_in_app() just return, indicating that we're done if IN_PROGRESS is removed.

The Linux kernel CVE team has assigned CVE-2025-38411 to this issue.

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

	Issue introduced in 6.15.3 with commit 329ba1cb402ac328224965b8fc7a554a5150908e and fixed in 6.15.6 with commit d18facba5a5795ad44b2a00a052e3db2fa77ab12
	Issue introduced in 6.16-rc1 with commit 2b1424cd131cfaba4cf7040473133d26cddac088 and fixed in 6.16-rc5 with commit 9df7b5ebead649b00bf9a53a798e4bf83a1318fd

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-2025-38411

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/netfs/misc.c
include/trace/events/netfs.h

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/d18facba5a5795ad44b2a00a052e3db2fa77ab12
	https://git.kernel.org/stable/c/9df7b5ebead649b00bf9a53a798e4bf83a1318fd