{"id":"CVE-2025-40285","summary":"smb/server: fix possible refcount leak in smb2_sess_setup()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb/server: fix possible refcount leak in smb2_sess_setup()\n\nReference count of ksmbd_session will leak when session need reconnect.\nFix this by adding the missing ksmbd_user_session_put().","modified":"2026-04-16T04:44:10.272156215Z","published":"2025-12-06T21:51:09.590Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40285.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/379510a815cb2e64eb0a379cb62295d6ade65df0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6fc935f798d44a8eb8a5e6659198399fbf57b981"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/dcc51dfe6ff26b52cac106865a172ac982d78401"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e671f9bb97805771380c98de944e2ceab6949188"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40285.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40285"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"37a0e2b362b3150317fb6e2139de67b1e29ae5ff"},{"fixed":"6fc935f798d44a8eb8a5e6659198399fbf57b981"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"450a844c045ff0895d41b05a1cbe8febd1acfcfd"},{"fixed":"e671f9bb97805771380c98de944e2ceab6949188"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"a39e31e22a535d47b14656a7d6a893c7f6cf758c"},{"fixed":"dcc51dfe6ff26b52cac106865a172ac982d78401"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b95629435b84b9ecc0c765995204a4d8a913ed52"},{"fixed":"d37b2c81c83d6c0d5ca582f4fe73c672983f9e0d"},{"fixed":"379510a815cb2e64eb0a379cb62295d6ade65df0"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"2107ab40629aeabbec369cf34b8cf0f288c3eb1b"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40285.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.159"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.59"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.17.9"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40285.json"}}],"schema_version":"1.7.5"}