{"id":"CVE-2026-68381","state":"PUBLISHED","title":"ksmbd: pin conn during async oplock break notification","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: pin conn during async oplock break notification\n\nsmb2_oplock_break_noti() and smb2_lease_break_noti() store a ksmbd_conn\npointer in an async ksmbd_work and then queue that work on ksmbd-io.  The\nwork only increments conn->r_count, which prevents teardown from passing\nthe pending-request wait after the increment, but it does not pin the\nstruct ksmbd_conn object.\n\nIf connection teardown races with an oplock break notification, the last\nconn reference can be dropped before the queued worker finishes.  The\nworker then uses the freed conn in ksmbd_conn_write() and\nksmbd_conn_r_count_dec().\n\nTake a real conn reference when publishing the conn pointer to the async\nwork item, and drop it after the notification work has decremented\nr_count.  Apply the same lifetime rule to lease break notification, which\nuses the same work->conn pattern.","publishedAt":"2026-08-10T12:03:59.849Z","updatedAt":"2026-10-30T12:28:25.660Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8e6508c7ecb1802909f294827eff38f301d0c937","status":"affected","lessThan":"dab1493bc9d97947f1219d6823c2e2a28636021b","versionType":"git"},{"version":"09aeab68033161cb54f194da93e51a11aee6144b","status":"affected","lessThan":"0f72fc9659d7f585460d43c158055df5afdcffb6","versionType":"git"},{"version":"a4261bbc33fbf99b99c80aa3a2c5097611802980","status":"affected","lessThan":"793e1c7041b93af96ff87e678329bc16aee7ba88","versionType":"git"},{"version":"3aa660c059240e0c795217182cf7df32909dd917","status":"affected","lessThan":"6ecb252efa0b413ac3d9979fb4eec247f8fc1258","versionType":"git"},{"version":"3aa660c059240e0c795217182cf7df32909dd917","status":"affected","lessThan":"14062c74e5b25c27edcff7a2fe0dc701c930b372","versionType":"git"},{"version":"3aa660c059240e0c795217182cf7df32909dd917","status":"affected","lessThan":"aa5d8f3f96aa11a4a54ce993c11ce8af11c546f9","versionType":"git"},{"version":"f17d1c63a76b0fe8e9c78023a86507a3a6d62cfa","status":"affected","versionType":"git"},{"version":"6.6.84","status":"affected","lessThan":"6.6.148","versionType":"semver"},{"version":"6.12.20","status":"affected","lessThan":"6.12.101","versionType":"semver"},{"version":"6.13.8","status":"affected","lessThan":"6.14","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.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.6.148","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","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/dab1493bc9d97947f1219d6823c2e2a28636021b","https://git.kernel.org/stable/c/0f72fc9659d7f585460d43c158055df5afdcffb6","https://git.kernel.org/stable/c/793e1c7041b93af96ff87e678329bc16aee7ba88","https://git.kernel.org/stable/c/6ecb252efa0b413ac3d9979fb4eec247f8fc1258","https://git.kernel.org/stable/c/14062c74e5b25c27edcff7a2fe0dc701c930b372","https://git.kernel.org/stable/c/aa5d8f3f96aa11a4a54ce993c11ce8af11c546f9"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-30T12:46:06.359Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/68xxx/CVE-2026-68381.json","commit":"1f312381e38164a43607eebab851b151dd16861e","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-68381","state":"PUBLISHED","datePublished":"2026-08-10T12:03:59.849Z","dateUpdated":"2026-10-30T12:28:25.660Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-30T09:28:09.387Z"},"containers":{"cna":{"title":"ksmbd: pin conn during async oplock break notification","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: pin conn during async oplock break notification\n\nsmb2_oplock_break_noti() and smb2_lease_break_noti() store a ksmbd_conn\npointer in an async ksmbd_work and then queue that work on ksmbd-io.  The\nwork only increments conn->r_count, which prevents teardown from passing\nthe pending-request wait after the increment, but it does not pin the\nstruct ksmbd_conn object.\n\nIf connection teardown races with an oplock break notification, the last\nconn reference can be dropped before the queued worker finishes.  The\nworker then uses the freed conn in ksmbd_conn_write() and\nksmbd_conn_r_count_dec().\n\nTake a real conn reference when publishing the conn pointer to the async\nwork item, and drop it after the notification work has decremented\nr_count.  Apply the same lifetime rule to lease break notification, which\nuses the same work->conn pattern."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"8e6508c7ecb1802909f294827eff38f301d0c937","status":"affected","lessThan":"dab1493bc9d97947f1219d6823c2e2a28636021b","versionType":"git"},{"version":"09aeab68033161cb54f194da93e51a11aee6144b","status":"affected","lessThan":"0f72fc9659d7f585460d43c158055df5afdcffb6","versionType":"git"},{"version":"a4261bbc33fbf99b99c80aa3a2c5097611802980","status":"affected","lessThan":"793e1c7041b93af96ff87e678329bc16aee7ba88","versionType":"git"},{"version":"3aa660c059240e0c795217182cf7df32909dd917","status":"affected","lessThan":"6ecb252efa0b413ac3d9979fb4eec247f8fc1258","versionType":"git"},{"version":"3aa660c059240e0c795217182cf7df32909dd917","status":"affected","lessThan":"14062c74e5b25c27edcff7a2fe0dc701c930b372","versionType":"git"},{"version":"3aa660c059240e0c795217182cf7df32909dd917","status":"affected","lessThan":"aa5d8f3f96aa11a4a54ce993c11ce8af11c546f9","versionType":"git"},{"version":"f17d1c63a76b0fe8e9c78023a86507a3a6d62cfa","status":"affected","versionType":"git"},{"version":"6.6.84","status":"affected","lessThan":"6.6.148","versionType":"semver"},{"version":"6.12.20","status":"affected","lessThan":"6.12.101","versionType":"semver"},{"version":"6.13.8","status":"affected","lessThan":"6.14","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.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.14","versionType":"semver"},{"version":"6.6.148","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.101","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.42","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.6","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","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/dab1493bc9d97947f1219d6823c2e2a28636021b"},{"url":"https://git.kernel.org/stable/c/0f72fc9659d7f585460d43c158055df5afdcffb6"},{"url":"https://git.kernel.org/stable/c/793e1c7041b93af96ff87e678329bc16aee7ba88"},{"url":"https://git.kernel.org/stable/c/6ecb252efa0b413ac3d9979fb4eec247f8fc1258"},{"url":"https://git.kernel.org/stable/c/14062c74e5b25c27edcff7a2fe0dc701c930b372"},{"url":"https://git.kernel.org/stable/c/aa5d8f3f96aa11a4a54ce993c11ce8af11c546f9"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - ksmbd is the in-kernel SMB server listening on TCP/445 (and SMB-Direct); the oplock/lease break notification path is driven entirely by remote SMB2 CREATE/close traffic and connection teardown, so a remote peer reaches the freed-conn use over the network.\nAC:L - The attacker controls both sides of the race: one connection holds a batch oplock/lease while a second connection opens the same file to force the async break, and the first connection is then abruptly dropped so teardown passes the r_count wait before the increment lands; this can be retried across arbitrarily many connections.\nPR:N - ksmbd share access is commonly exposed with guest/anonymous mapping, so an unauthenticated or trivially-credentialed remote client can open files and trigger oplock/lease breaks; consistent with prior ksmbd connection-lifetime UAF scoring, no meaningful privilege gate protects this path.\nUI:N - No victim action is needed; the attacker's own two SMB connections create the oplock break and the racing disconnect entirely on their own initiative.\nS:U - The freed object and the corrupted state are both kernel memory owned by the ksmbd server within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Use-after-free of struct ksmbd_conn lets the attacker reclaim the slab object with attacker-shaped data and have the worker read conn->transport and response state from it, enabling disclosure of kernel memory and pointer values, potentially leaked back over the SMB connection.\nI:H - ksmbd_conn_write() dereferences conn->transport->ops->writev from the freed object and indirectly calls it, and ksmbd_conn_lock()/ksmbd_conn_r_count_dec() perform mutex and atomic/waitqueue writes into freed memory, giving heap-spray-based control-flow hijack and arbitrary-write potential.\nA:H - Even without successful exploitation, using a freed ksmbd_conn (mutex operations, transport pointer dereference, waitqueue wakeup) reliably causes memory corruption, oops, or kernel panic, taking down the whole system."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:28:25.660Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.6.84","versionEndExcluding":"6.6.148"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.12.20","versionEndExcluding":"6.12.101"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"6.18.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.1.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.14","versionEndExcluding":"7.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.13.8"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-68381","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-16T15:47:40.959770Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","type":"CWE","description":"CWE-416 Use After Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T21:09:06.923Z"}}]}}}