{"id":"CVE-2026-139646","summary":"crypto: ccp - fix SFS ioctl race against device teardown","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: ccp - fix SFS ioctl race against device teardown\n\nsfs_ioctl() reads psp_master-\u003esfs_data and caches it in sfs_dev before\ntaking sfs_ioctl_mutex, while sfs_dev_destroy() frees sfs_dev-\u003epage\nand sfs_dev-\u003ecommand_buf with no locking at all and only clears\npsp-\u003esfs_data afterwards. A call to sfs_ioctl() that reads sfs_data\njust before sfs_dev_destroy() runs will still acquire the mutex and\ngo on to use the now-freed command buffer in send_sfs_cmd().\n\nHave both functions take sfs_ioctl_mutex before touching\npsp-\u003esfs_data, so a call that is already using sfs_dev completes\nbefore teardown can free it, and a call arriving after teardown sees\nsfs_data cleared and returns -ENODEV instead of racing it.","modified":"2026-12-01T21:02:34.823459185Z","published":"2026-11-30T13:36:40.715Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139646.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/54a7e3828df45fdb85ea5a1e79a94d4e95b78823"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6beb23aa2ec4c64f477d1c8e419c7e7da7046f26"},{"type":"WEB","url":"https://git.kernel.org/stable/c/de4929b47683ed22d8c05f68d2d0f0cfd95b90a1"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139646.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139646"},{"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":"648dbccc03a000cd64c2a9d86012d98053545e64"},{"fixed":"54a7e3828df45fdb85ea5a1e79a94d4e95b78823"},{"fixed":"6beb23aa2ec4c64f477d1c8e419c7e7da7046f26"},{"fixed":"de4929b47683ed22d8c05f68d2d0f0cfd95b90a1"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139646.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.18.0"},{"fixed":"6.18.65"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.6"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-139646.json"}}],"schema_version":"1.9.2"}