{"id":"CVE-2025-37802","state":"PUBLISHED","title":"ksmbd: fix WARNING \"do not call blocking ops when !TASK_RUNNING\"","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix WARNING \"do not call blocking ops when !TASK_RUNNING\"\n\nwait_event_timeout() will set the state of the current\ntask to TASK_UNINTERRUPTIBLE, before doing the condition check. This\nmeans that ksmbd_durable_scavenger_alive() will try to acquire the mutex\nwhile already in a sleeping state. The scheduler warns us by giving\nthe following warning:\n\ndo not call blocking ops when !TASK_RUNNING; state=2 set at\n [<0000000061515a6f>] prepare_to_wait_event+0x9f/0x6c0\nWARNING: CPU: 2 PID: 4147 at kernel/sched/core.c:10099 __might_sleep+0x12f/0x160\n\nmutex lock is not needed in ksmbd_durable_scavenger_alive().","publishedAt":"2025-05-08T06:26:03.075Z","updatedAt":"2026-09-14T11:57:58.953Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"97aabdbf7ba82da20e698f0e62917fb206d42941","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"8f805b3746d2f41702c77cba22f94f8415fadd1a","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"cd161198e091e8a62b9bd631be970ea9a87d2d6a","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"1df0d4c616138784e033ad337961b6e1a6bcd999","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/vfs_cache.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.6.157","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.26","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.5","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/vfs_cache.c"]}],"references":["https://git.kernel.org/stable/c/97aabdbf7ba82da20e698f0e62917fb206d42941","https://git.kernel.org/stable/c/8f805b3746d2f41702c77cba22f94f8415fadd1a","https://git.kernel.org/stable/c/cd161198e091e8a62b9bd631be970ea9a87d2d6a","https://git.kernel.org/stable/c/1df0d4c616138784e033ad337961b6e1a6bcd999"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:03.054Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/37xxx/CVE-2025-37802.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-37802","state":"PUBLISHED","datePublished":"2025-05-08T06:26:03.075Z","dateUpdated":"2026-09-14T11:57:58.953Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:23.941Z"},"containers":{"cna":{"title":"ksmbd: fix WARNING \"do not call blocking ops when !TASK_RUNNING\"","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix WARNING \"do not call blocking ops when !TASK_RUNNING\"\n\nwait_event_timeout() will set the state of the current\ntask to TASK_UNINTERRUPTIBLE, before doing the condition check. This\nmeans that ksmbd_durable_scavenger_alive() will try to acquire the mutex\nwhile already in a sleeping state. The scheduler warns us by giving\nthe following warning:\n\ndo not call blocking ops when !TASK_RUNNING; state=2 set at\n [<0000000061515a6f>] prepare_to_wait_event+0x9f/0x6c0\nWARNING: CPU: 2 PID: 4147 at kernel/sched/core.c:10099 __might_sleep+0x12f/0x160\n\nmutex lock is not needed in ksmbd_durable_scavenger_alive()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"97aabdbf7ba82da20e698f0e62917fb206d42941","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"8f805b3746d2f41702c77cba22f94f8415fadd1a","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"cd161198e091e8a62b9bd631be970ea9a87d2d6a","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","status":"affected","lessThan":"1df0d4c616138784e033ad337961b6e1a6bcd999","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/vfs_cache.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.6.157","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.26","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.14.5","status":"unaffected","lessThanOrEqual":"6.14.*","versionType":"semver"},{"version":"6.15","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/vfs_cache.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/97aabdbf7ba82da20e698f0e62917fb206d42941"},{"url":"https://git.kernel.org/stable/c/8f805b3746d2f41702c77cba22f94f8415fadd1a"},{"url":"https://git.kernel.org/stable/c/cd161198e091e8a62b9bd631be970ea9a87d2d6a"},{"url":"https://git.kernel.org/stable/c/1df0d4c616138784e033ad337961b6e1a6bcd999"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is in ksmbd, the in-kernel SMB server listening on TCP/445, and the trigger is SMB2 SESSION_SETUP / connection teardown traffic from a remote peer. No local access is needed.\nAC:L - The scavenger kthread hits the bad `mutex_lock()`-under-TASK_UNINTERRUPTIBLE on its very first wait, deterministically, whenever a session is destroyed while a durable handle exists; the attacker also controls both sides of the lock contention by churning sessions across parallel connections.\nPR:N - `ksmbd_session_destroy()` — which launches the scavenger — is reached before authentication, via `ksmbd_session_register()`→`ksmbd_expire_session()` reaping a non-VALID (unauthenticated) session and via `ksmbd_sessions_deregister()` on connection close; on guest-mapped shares the attacker can also populate the durable-handle table with no credentials.\nUI:N - Exploitation requires only that the attacker open SMB connections and issue SESSION_SETUP requests; no action by a local user or administrator is needed.\nS:U - The corrupted task state and the resulting warning/spin are confined to the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:N - There is no out-of-bounds read or use-after-free; the WARN backtrace goes to the kernel log, which is not accessible to the remote attacker.\nI:N - No memory corruption or data modification occurs — the only state damaged is the scavenger kthread's own scheduler state, which does not yield a write primitive.\nA:H - The bug produces a kernel WARNING splat that becomes a full panic under `panic_on_warn`, and the clobbered task state turns the scavenger into a busy loop repeatedly holding `write_lock(&global_ft.lock)`, exhausting a CPU and stalling all SMB file open/close processing."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-09-14T11:57:58.953Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.157"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.26"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.14.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.15"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}