{"id":"CVE-2026-64141","state":"PUBLISHED","title":"ksmbd: fix null pointer dereference in compare_guid_key()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix null pointer dereference in compare_guid_key()\n\nsession_fd_check() walks the per-inode m_op_list during durable-handle\nsession teardown and sets op->conn = NULL for every opinfo whose conn\nmatched the closing session's connection. The matching opinfo, however,\nstays linked in its per-ClientGuid lease_table_list entry's lb->lease_list\nbecause destroy_lease_table() only runs on full TCP-connection teardown,\nnot on SESSION_LOGOFF.\n\nIf the same TCP connection then negotiates a fresh session with the\nsame ClientGuid (ClientGuid is bound to NEGOTIATE, not the session, and\nis unchanged across LOGOFF + SETUP) and issues a SMB2 CREATE with a\nlease context on a different inode, find_same_lease_key() walks\nlb->lease_list, reaches the stale opinfo, and calls compare_guid_key(),\nwhich unconditionally dereferences opinfo->conn->ClientGUID. The conn\npointer is NULL and the kernel panics.\n\nReproducer requires only a successful SMB2 SESSION_SETUP and a share\nconfigured with 'durable handles = yes'. KASAN report on mainline\n70390501d194:\n\n  general protection fault, probably for non-canonical address\n  0xdffffc0000000069: 0000 [#1] SMP KASAN PTI\n  KASAN: null-ptr-deref in range [0x0000000000000348-0x000000000000034f]\n  Workqueue: ksmbd-io handle_ksmbd_work\n  RIP: 0010:bcmp+0x5b/0x230\n  Call Trace:\n   compare_guid_key+0x4b/0xd0\n   find_same_lease_key+0x324/0x690\n   smb2_open+0x6aea/0x8e60\n   handle_ksmbd_work+0x796/0xee0\n   ...\n\nFaulting address 0x348 is the offset of ClientGUID within struct\nksmbd_conn, confirming opinfo->conn was NULL.\n\nRead opinfo->conn once and bail out if it has been cleared by a\nconcurrent session_fd_check(). A half-detached opinfo cannot be the\nowner of an active lease, so returning 0 is the correct match result.","publishedAt":"2026-07-19T15:40:33.890Z","updatedAt":"2026-08-05T12:39:41.570Z","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":"8df4bcdb0a4232192b2445256c39b787d58ef14d","status":"affected","lessThan":"e43cb36d4d7827710cfcd48e95e29a507f0d87be","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"0836081b394ca074d1b910f2b990ff7b4b4404c7","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"cd5c1b75d2f454f625d7dc55bd3ae21d0855f6ad","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"af86896ca3239e25a6bd7d352213371265073d38","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"4b83cbc4c15f09b000cc06f033f64b0824b6dc87","versionType":"git"},{"version":"6.6.32","status":"affected","lessThan":"6.6.142","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.6.142","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.92","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.34","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.11","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","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/oplock.c"]}],"references":["https://git.kernel.org/stable/c/e43cb36d4d7827710cfcd48e95e29a507f0d87be","https://git.kernel.org/stable/c/0836081b394ca074d1b910f2b990ff7b4b4404c7","https://git.kernel.org/stable/c/cd5c1b75d2f454f625d7dc55bd3ae21d0855f6ad","https://git.kernel.org/stable/c/af86896ca3239e25a6bd7d352213371265073d38","https://git.kernel.org/stable/c/4b83cbc4c15f09b000cc06f033f64b0824b6dc87"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/64xxx/CVE-2026-64141.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-64141","state":"PUBLISHED","datePublished":"2026-07-19T15:40:33.890Z","dateUpdated":"2026-08-05T12:39:41.570Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-19T07:54:57.037Z"},"containers":{"cna":{"title":"ksmbd: fix null pointer dereference in compare_guid_key()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix null pointer dereference in compare_guid_key()\n\nsession_fd_check() walks the per-inode m_op_list during durable-handle\nsession teardown and sets op->conn = NULL for every opinfo whose conn\nmatched the closing session's connection. The matching opinfo, however,\nstays linked in its per-ClientGuid lease_table_list entry's lb->lease_list\nbecause destroy_lease_table() only runs on full TCP-connection teardown,\nnot on SESSION_LOGOFF.\n\nIf the same TCP connection then negotiates a fresh session with the\nsame ClientGuid (ClientGuid is bound to NEGOTIATE, not the session, and\nis unchanged across LOGOFF + SETUP) and issues a SMB2 CREATE with a\nlease context on a different inode, find_same_lease_key() walks\nlb->lease_list, reaches the stale opinfo, and calls compare_guid_key(),\nwhich unconditionally dereferences opinfo->conn->ClientGUID. The conn\npointer is NULL and the kernel panics.\n\nReproducer requires only a successful SMB2 SESSION_SETUP and a share\nconfigured with 'durable handles = yes'. KASAN report on mainline\n70390501d194:\n\n  general protection fault, probably for non-canonical address\n  0xdffffc0000000069: 0000 [#1] SMP KASAN PTI\n  KASAN: null-ptr-deref in range [0x0000000000000348-0x000000000000034f]\n  Workqueue: ksmbd-io handle_ksmbd_work\n  RIP: 0010:bcmp+0x5b/0x230\n  Call Trace:\n   compare_guid_key+0x4b/0xd0\n   find_same_lease_key+0x324/0x690\n   smb2_open+0x6aea/0x8e60\n   handle_ksmbd_work+0x796/0xee0\n   ...\n\nFaulting address 0x348 is the offset of ClientGUID within struct\nksmbd_conn, confirming opinfo->conn was NULL.\n\nRead opinfo->conn once and bail out if it has been cleared by a\nconcurrent session_fd_check(). A half-detached opinfo cannot be the\nowner of an active lease, so returning 0 is the correct match result."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8df4bcdb0a4232192b2445256c39b787d58ef14d","status":"affected","lessThan":"e43cb36d4d7827710cfcd48e95e29a507f0d87be","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"0836081b394ca074d1b910f2b990ff7b4b4404c7","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"cd5c1b75d2f454f625d7dc55bd3ae21d0855f6ad","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"af86896ca3239e25a6bd7d352213371265073d38","versionType":"git"},{"version":"c8efcc786146a951091588e5fa7e3c754850cb3c","status":"affected","lessThan":"4b83cbc4c15f09b000cc06f033f64b0824b6dc87","versionType":"git"},{"version":"6.6.32","status":"affected","lessThan":"6.6.142","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/oplock.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.6.142","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.92","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.34","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.11","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","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/oplock.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e43cb36d4d7827710cfcd48e95e29a507f0d87be"},{"url":"https://git.kernel.org/stable/c/0836081b394ca074d1b910f2b990ff7b4b4404c7"},{"url":"https://git.kernel.org/stable/c/cd5c1b75d2f454f625d7dc55bd3ae21d0855f6ad"},{"url":"https://git.kernel.org/stable/c/af86896ca3239e25a6bd7d352213371265073d38"},{"url":"https://git.kernel.org/stable/c/4b83cbc4c15f09b000cc06f033f64b0824b6dc87"}],"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 - ksmbd is an in-kernel SMB server on TCP/445; the crash is triggered by remote SMB2 packets processed in `handle_ksmbd_work()` without local access.\nAC:L - The attacker fully controls the deterministic sequence (durable CREATE with lease, SESSION_LOGOFF, SESSION_SETUP on the same TCP connection, CREATE with lease on another file); no race or timing dependency beyond attacker-driven requests.\nPR:N - Exploitation requires only network reachability to ksmbd and completion of SMB2 SESSION_SETUP (including guest/anonymous where permitted); no prior Linux OS privileges or capabilities are needed on the host.\nUI:N - No victim user action is required beyond the attacker sending crafted SMB2 protocol messages to the server.\nS:U - Impact is a kernel oops/panic within the ksmbd server context; it does not cross a security boundary such as guest-to-host escape or sandbox breakout.\nC:N - The fault is a NULL pointer dereference in `bcmp()` at offset 0x348 into `struct ksmbd_conn`; the invalid read faults before any data is returned to the attacker.\nI:N - There is no memory corruption or write primitive—only a read through a NULL `opinfo->conn` pointer that immediately triggers a kernel fault.\nA:H - A remotely triggerable NULL dereference in kernel workqueue context causes a general protection fault/kernel oops, enabling repeatable denial of service against the host."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:39:41.570Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.32","versionEndExcluding":"6.6.142"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.12.92"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.18.34"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"7.0.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}