{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39720","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.117Z","datePublished":"2025-09-05T17:21:28.060Z","dateUpdated":"2026-08-05T12:04:51.277Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:04:51.277Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix refcount leak causing resource not released\n\nWhen ksmbd_conn_releasing(opinfo->conn) returns true,the refcount was not\ndecremented properly, causing a refcount leak that prevents the count from\nreaching zero and the memory from being released."}],"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 is driven entirely by remote SMB2 CREATE/WRITE/CLOSE traffic and connection teardown. No local access is needed.\nAC:L - The leak is deterministic, not a race: `ksmbd_conn_set_releasing()` runs before the file table is torn down, so `smb_lazy_parent_lease_break_close()` always sees the connection's own v2 directory-lease opinfo with `conn` already RELEASING. The multi-connection variant against `smb_break_all_levII_oplock()` is also fully attacker-controlled and the window can be widened at will by keeping a request pending.\nPR:N - ksmbd supports guest/anonymous sessions (`user_guest()`, `SMB2_SESSION_FLAG_IS_GUEST_LE`), so on the guest-mapped shares typical of NAS and embedded deployments an unauthenticated client can open a file with a lease and reach these paths; otherwise only an ordinary unprivileged SMB account is needed.\nUI:N - The attacker triggers everything itself by opening a leased handle and closing the connection; no action by any local user or administrator is involved.\nS:U - The leaked allocations and the resulting exhaustion are confined to the kernel's own memory, the same security authority as the vulnerable ksmbd code. No boundary such as VM or IOMMU is crossed.\nC:N - Nothing is freed early, read out of bounds, or copied to the client; the only effect is that objects are never released. No kernel data or pointer value is exposed.\nI:N - No memory is overwritten and no file or kernel state is modified incorrectly; the reference count simply never reaches zero.\nA:H - Each trigger permanently leaks an `oplock_info`, `lease`, the whole `ksmbd_conn`, the `tcp_transport`/iov, and the accepted TCP socket (since `sock_release()` only runs on the final conn put), and it can be repeated per connection without bound, driving the kernel to unreclaimable memory exhaustion and OOM."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"],"versions":[{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"a1d2bab4d53368a526c97aba92671dd71814f95a","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"36e010bb865fbaa1202fe9bcce3fd486d6db7606","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"9a7abce6e8c0e2145b346a6d4abf0d9655e9b0e8","status":"affected","versionType":"git"},{"version":"0626e6641f6b467447c81dd7678a69c66f7746cf","lessThan":"89bb430f621124af39bb31763c4a8b504c9651e2","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"],"versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","status":"unaffected","versionType":"semver"},{"version":"6.6.103","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.44","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.4","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.6.103"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.12.44"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.16.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.17"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/a1d2bab4d53368a526c97aba92671dd71814f95a"},{"url":"https://git.kernel.org/stable/c/36e010bb865fbaa1202fe9bcce3fd486d6db7606"},{"url":"https://git.kernel.org/stable/c/9a7abce6e8c0e2145b346a6d4abf0d9655e9b0e8"},{"url":"https://git.kernel.org/stable/c/89bb430f621124af39bb31763c4a8b504c9651e2"}],"title":"ksmbd: fix refcount leak causing resource not released","x_generator":{"engine":"bippy-1.2.0"}}}}