Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 084BB224AEF for ; Tue, 16 Dec 2025 14:21:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765894899; cv=none; b=XPEOthgxmlfM9KItRQr2HAU6Tr/Ea1Dv4aBaHsD1ogphfkUGgbevP25rwomfi1PIpYDGIldqiRW/yZWuAG2SOTOx/LPu+7SY9VU3TqrYFfOCtMFSiZvI6kJMQ4UMcrdEAZDCLykNgQfRJdzdwK+r/RS0Tv3srJFVmMjeJIyfpx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765894899; c=relaxed/simple; bh=+PTsslZAylbhkHdAQeQY0cXlGIcK5cq3tD3v1JieZKw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I1fQipXeVtKPJDboQKcQz3gLIH11P2RvNjfKTeX0BROLclFlcZJkGqNook+zDZLrrM3U9t+CgR5/SDMGhhbgy8pIWcY6u6Nhz2uKCjxMkqxuntKoeFQHPpUBMLnqvOQdOEqxhMu8zqTUq3EpNGKyfBxury98LyxDPPwjRpwi7Uw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IfR6u51e; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IfR6u51e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 089ACC4CEF1; Tue, 16 Dec 2025 14:21:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1765894898; bh=+PTsslZAylbhkHdAQeQY0cXlGIcK5cq3tD3v1JieZKw=; h=From:To:Cc:Subject:Date:Reply-To:From; b=IfR6u51eTRkKlwm11fnhCHyTukJ9/usYIDmj3yG/CdS7fPnh5L8NHI+hEn5PRkcmL 3fGuHk584Fq87sBUxvyfGrUEFJqyqYmEMOTE+R4azQ7TN7rz/EjtHGy00J/0gF7ljp Kr8r146XgxBnQ/AyQa1SexkDbr6Vb2n6pRi2KdhM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-68240: nilfs2: avoid having an active sc_timer before freeing sci Date: Tue, 16 Dec 2025 15:21:32 +0100 Message-ID: <2025121632-CVE-2025-68240-03ff@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2980; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fpOZVLQjz/0IiS4MUUInUWvAUm/lhNhd2jE/YuCdxxc=; b=owGbwMvMwCRo6H6F97bub03G02pJDJmOWW9iXf61rZw5KUvT+9p1401dSbtK9qqsW7Si3n3aD 67igjNxHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARrgkMC3Yt+JgW48nxyN8q KshjVoSo35WbNxgWHOzafFl89vS61r5ftzv/HNNZ8mR7NQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: nilfs2: avoid having an active sc_timer before freeing sci Because kthread_stop did not stop sc_task properly and returned -EINTR, the sc_timer was not properly closed, ultimately causing the problem [1] reported by syzbot when freeing sci due to the sc_timer not being closed. Because the thread sc_task main function nilfs_segctor_thread() returns 0 when it succeeds, when the return value of kthread_stop() is not 0 in nilfs_segctor_destroy(), we believe that it has not properly closed sc_timer. We use timer_shutdown_sync() to sync wait for sc_timer to shutdown, and set the value of sc_task to NULL under the protection of lock sc_state_lock, so as to avoid the issue caused by sc_timer not being properly shutdowned. [1] ODEBUG: free active (active state 0) object: 00000000dacb411a object type: timer_list hint: nilfs_construction_timeout Call trace: nilfs_segctor_destroy fs/nilfs2/segment.c:2811 [inline] nilfs_detach_log_writer+0x668/0x8cc fs/nilfs2/segment.c:2877 nilfs_put_super+0x4c/0x12c fs/nilfs2/super.c:509 The Linux kernel CVE team has assigned CVE-2025-68240 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 3f66cc261ccb54a8e4d8d5aa51c389c19453b00c and fixed in 6.12.59 with commit 36049e81dc7f077e0e24d5b9688a7458beacef8f Issue introduced in 6.12 with commit 3f66cc261ccb54a8e4d8d5aa51c389c19453b00c and fixed in 6.17.9 with commit 2f65799e2a736d556d306440c4e1e8906736117a Issue introduced in 6.12 with commit 3f66cc261ccb54a8e4d8d5aa51c389c19453b00c and fixed in 6.18 with commit 9a6b60cb147d53968753a34805211d2e5e08c027 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-68240 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/nilfs2/segment.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/36049e81dc7f077e0e24d5b9688a7458beacef8f https://git.kernel.org/stable/c/2f65799e2a736d556d306440c4e1e8906736117a https://git.kernel.org/stable/c/9a6b60cb147d53968753a34805211d2e5e08c027