{"schema_version":"1.9.0","id":"CVE-2025-22040","published":"2025-04-16T14:11:57.601Z","modified":"2026-08-12T03:51:21.985710277Z","summary":"ksmbd: fix session use-after-free in multichannel connection","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix session use-after-free in multichannel connection\n\nThere is a race condition between session setup and\nksmbd_sessions_deregister. The session can be freed before the connection\nis added to channel list of session.\nThis patch check reference count of session before freeing it.","affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0626e6641f6b467447c81dd7678a69c66f7746cf"},{"fixed":"596407adb9af1ee75fe7c7529607783d31b66e7f"},{"fixed":"3980770cb1470054e6400fd97668665975726737"},{"fixed":"9069939d762138e232a6f79e3e1462682ed6a17d"},{"fixed":"94c281721d4ed2d972232414b91d98a6f5bdb16b"},{"fixed":"7dfbd4c43eed91dd2548a95236908025707a8dfd"},{"fixed":"fa4cdb8cbca7d6cb6aa13e4d8d83d1103f6345db"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22040.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.15.0"},{"fixed":"6.1.134"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.87"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.23"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.13.11"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.14.0"},{"fixed":"6.14.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22040.json"}}],"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/3980770cb1470054e6400fd97668665975726737"},{"type":"WEB","url":"https://git.kernel.org/stable/c/596407adb9af1ee75fe7c7529607783d31b66e7f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7dfbd4c43eed91dd2548a95236908025707a8dfd"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9069939d762138e232a6f79e3e1462682ed6a17d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/94c281721d4ed2d972232414b91d98a6f5bdb16b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fa4cdb8cbca7d6cb6aa13e4d8d83d1103f6345db"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22040.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-22040"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22040.json"},"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}