In the Linux kernel, the following vulnerability has been resolved:
nilfs2: avoid having an active sc_timer before freeing sci
Because kthreadstop did not stop sctask properly and returned -EINTR, the sctimer was not properly closed, ultimately causing the problem [1] reported by syzbot when freeing sci due to the sctimer not being closed.
Because the thread sctask main function nilfssegctorthread() returns 0 when it succeeds, when the return value of kthreadstop() is not 0 in nilfssegctordestroy(), we believe that it has not properly closed sc_timer.
We use timershutdownsync() to sync wait for sctimer to shutdown, and set the value of sctask to NULL under the protection of lock scstatelock, 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: timerlist hint: nilfsconstructiontimeout Call trace: nilfssegctordestroy fs/nilfs2/segment.c:2811 [inline] nilfsdetachlogwriter+0x668/0x8cc fs/nilfs2/segment.c:2877 nilfsputsuper+0x4c/0x12c fs/nilfs2/super.c:509
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68240.json"
}