{"api_version":"1","generated_at":"2026-07-20T14:43:26+00:00","cve":"CVE-2026-64139","urls":{"html":"https://cve.report/CVE-2026-64139","api":"https://cve.report/api/cve/CVE-2026-64139.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-64139","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-64139"},"summary":{"title":"ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow\n\nCommit 299f962c0b02 (\"ksmbd: use check_add_overflow() to prevent u16\nDACL size overflow\") added check_add_overflow() guards that break out\nof the ACE-building loops in set_posix_acl_entries_dacl() when the\naccumulated DACL size would wrap past 65535.\n\nHowever, each iteration allocates a struct smb_sid via kmalloc_obj()\nat the top of the loop and relies on the kfree(sid) call at the end\nof the loop body (the 'pass_same_sid' label in the first loop, and\nthe explicit kfree at the tail of the second loop) to release it.\nThe newly introduced 'break' statements bypass those kfree() calls,\nleaking the sid buffer every time an overflow is detected.\n\nA malicious or malformed file with enough POSIX ACL entries to trip\nthe overflow check will leak one or more struct smb_sid allocations\non every request that touches the file's DACL, providing a trivial\nkernel memory exhaustion vector.\n\nFree sid before breaking out of the loops to plug the leak.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-07-19 16:17:55","updated_at":"2026-07-19 16:17:55"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/af92ee994cc7f7e83a41c2025f32257a2f82a7ef","name":"https://git.kernel.org/stable/c/af92ee994cc7f7e83a41c2025f32257a2f82a7ef","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/eced48cb08f07393a5ea770fdd1026452883c3ad","name":"https://git.kernel.org/stable/c/eced48cb08f07393a5ea770fdd1026452883c3ad","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9d378e17c864da08c3a4df41dae92cfa6468b00a","name":"https://git.kernel.org/stable/c/9d378e17c864da08c3a4df41dae92cfa6468b00a","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0e198f09cb2a554c04de0fea4e790f1250a943ca","name":"https://git.kernel.org/stable/c/0e198f09cb2a554c04de0fea4e790f1250a943ca","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/519fb0a42ce5d7e46935577309fb282a5f2c6ea3","name":"https://git.kernel.org/stable/c/519fb0a42ce5d7e46935577309fb282a5f2c6ea3","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-64139","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-64139","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8d5729350b236896f51379588d9a690b7fafb8db 9d378e17c864da08c3a4df41dae92cfa6468b00a git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected e1955a94b6f17f4b058afa955a6f187eb3ed7615 519fb0a42ce5d7e46935577309fb282a5f2c6ea3 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43 0e198f09cb2a554c04de0fea4e790f1250a943ca git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7 eced48cb08f07393a5ea770fdd1026452883c3ad git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 299f962c0b02d048fb45d248b4da493d03f3175d af92ee994cc7f7e83a41c2025f32257a2f82a7ef git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 41e53a773db6342ac9a689ee5ba635c31744c9f0 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.175 6.2 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6.136 6.6.142 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.84 6.12.92 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.25 6.18.34 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.0.2 7.0.11 semver","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/smb/server/smbacl.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"9d378e17c864da08c3a4df41dae92cfa6468b00a","status":"affected","version":"8d5729350b236896f51379588d9a690b7fafb8db","versionType":"git"},{"lessThan":"519fb0a42ce5d7e46935577309fb282a5f2c6ea3","status":"affected","version":"e1955a94b6f17f4b058afa955a6f187eb3ed7615","versionType":"git"},{"lessThan":"0e198f09cb2a554c04de0fea4e790f1250a943ca","status":"affected","version":"5e7b8f3c539d69b2ed5f2408e2f75e68ce7eef43","versionType":"git"},{"lessThan":"eced48cb08f07393a5ea770fdd1026452883c3ad","status":"affected","version":"ef7902be3f215b6bf7babe4dc9dd9a7d57dad7a7","versionType":"git"},{"lessThan":"af92ee994cc7f7e83a41c2025f32257a2f82a7ef","status":"affected","version":"299f962c0b02d048fb45d248b4da493d03f3175d","versionType":"git"},{"status":"affected","version":"41e53a773db6342ac9a689ee5ba635c31744c9f0","versionType":"git"},{"lessThan":"6.2","status":"affected","version":"6.1.175","versionType":"semver"}]},{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/smb/server/smbacl.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"6.6.142","status":"affected","version":"6.6.136","versionType":"semver"},{"lessThan":"6.12.92","status":"affected","version":"6.12.84","versionType":"semver"},{"lessThan":"6.18.34","status":"affected","version":"6.18.25","versionType":"semver"},{"lessThan":"7.0.11","status":"affected","version":"7.0.2","versionType":"semver"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.142","versionStartIncluding":"6.6.136","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.92","versionStartIncluding":"6.12.84","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.34","versionStartIncluding":"6.18.25","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0.11","versionStartIncluding":"7.0.2","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1.175","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow\n\nCommit 299f962c0b02 (\"ksmbd: use check_add_overflow() to prevent u16\nDACL size overflow\") added check_add_overflow() guards that break out\nof the ACE-building loops in set_posix_acl_entries_dacl() when the\naccumulated DACL size would wrap past 65535.\n\nHowever, each iteration allocates a struct smb_sid via kmalloc_obj()\nat the top of the loop and relies on the kfree(sid) call at the end\nof the loop body (the 'pass_same_sid' label in the first loop, and\nthe explicit kfree at the tail of the second loop) to release it.\nThe newly introduced 'break' statements bypass those kfree() calls,\nleaking the sid buffer every time an overflow is detected.\n\nA malicious or malformed file with enough POSIX ACL entries to trip\nthe overflow check will leak one or more struct smb_sid allocations\non every request that touches the file's DACL, providing a trivial\nkernel memory exhaustion vector.\n\nFree sid before breaking out of the loops to plug the leak."}],"providerMetadata":{"dateUpdated":"2026-07-19T15:40:32.459Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/9d378e17c864da08c3a4df41dae92cfa6468b00a"},{"url":"https://git.kernel.org/stable/c/519fb0a42ce5d7e46935577309fb282a5f2c6ea3"},{"url":"https://git.kernel.org/stable/c/0e198f09cb2a554c04de0fea4e790f1250a943ca"},{"url":"https://git.kernel.org/stable/c/eced48cb08f07393a5ea770fdd1026452883c3ad"},{"url":"https://git.kernel.org/stable/c/af92ee994cc7f7e83a41c2025f32257a2f82a7ef"}],"title":"ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-64139","datePublished":"2026-07-19T15:40:32.459Z","dateReserved":"2026-07-19T07:54:57.037Z","dateUpdated":"2026-07-19T15:40:32.459Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-07-19 16:17:55","lastModifiedDate":"2026-07-19 16:17:55","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"64139","Ordinal":"1","Title":"ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on ov","CVE":"CVE-2026-64139","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"64139","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on overflow\n\nCommit 299f962c0b02 (\"ksmbd: use check_add_overflow() to prevent u16\nDACL size overflow\") added check_add_overflow() guards that break out\nof the ACE-building loops in set_posix_acl_entries_dacl() when the\naccumulated DACL size would wrap past 65535.\n\nHowever, each iteration allocates a struct smb_sid via kmalloc_obj()\nat the top of the loop and relies on the kfree(sid) call at the end\nof the loop body (the 'pass_same_sid' label in the first loop, and\nthe explicit kfree at the tail of the second loop) to release it.\nThe newly introduced 'break' statements bypass those kfree() calls,\nleaking the sid buffer every time an overflow is detected.\n\nA malicious or malformed file with enough POSIX ACL entries to trip\nthe overflow check will leak one or more struct smb_sid allocations\non every request that touches the file's DACL, providing a trivial\nkernel memory exhaustion vector.\n\nFree sid before breaking out of the loops to plug the leak.","Type":"Description","Title":"ksmbd: fix SID memory leak in set_posix_acl_entries_dacl() on ov"}]}}}