{"id":"CVE-2026-97559","aliases":["CVE-2026-97559"],"related":[],"kind":"vulnerability","state":"published","title":"smb: client: fail DACL rewrite when the new DACL exceeds 64K","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fail DACL rewrite when the new DACL exceeds 64K\n\nreplace_sids_and_copy_aces() and set_chmod_dacl() accumulate the size of\nthe DACL they build in a u16. That accumulator can wrap.\n\nvalidate_dacl() caps num_aces at (dacl_size - sizeof(struct smb_acl)) /\n20, i.e. 3276 for a maximally sized DACL, while each rewritten ACE can\ngrow to sizeof(struct smb_ace) (76 bytes) once its SID is replaced with\none carrying SID_MAX_SUB_AUTHORITIES sub-authorities. The worst case is\ntherefore sizeof(struct smb_acl) + 3276 * 76 = 248984 bytes, far beyond\nwhat a u16 can hold. A wraparound is reached with 863 ACEs.\n\nAfter the wraparound, ndacl_ptr->size becomes meaningless and the offset\nwill point anywhere in the ACE array. As a result, we will see\ncorruption of the DACL, which then gets sent to the server. This is not\nan out-of-bounds write as the allocation now covers the worst-case\nexpansion, so writes will always go into the buffer.\n\nAdjust the code to use a u32 internally and return -EOVERFLOW in the\noverflow case. The operation must be refused, because a DACL can only\nhold 2^16-1 bytes on the wire and larger DACLs cannot be represented.\n\nset_chmod_dacl() carries the same pattern and is fixed the same way. It\nonly wraps once the source DACL comes within roughly 380 bytes of the\n64K ceiling, but the failure mode is identical.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: fail DACL rewrite when the new DACL exceeds 64K\n\nreplace_sids_and_copy_aces() and set_chmod_dacl() accumulate the size of\nthe DACL they build in a u16. That accumulator can wrap.\n\nvalidate_dacl() caps num_aces at (dacl_size - sizeof(struct smb_acl)) /\n20, i.e. 3276 for a maximally sized DACL, while each rewritten ACE can\ngrow to sizeof(struct smb_ace) (76 bytes) once its SID is replaced with\none carrying SID_MAX_SUB_AUTHORITIES sub-authorities. The worst case is\ntherefore sizeof(struct smb_acl) + 3276 * 76 = 248984 bytes, far beyond\nwhat a u16 can hold. A wraparound is reached with 863 ACEs.\n\nAfter the wraparound, ndacl_ptr->size becomes meaningless and the offset\nwill point anywhere in the ACE array. As a result, we will see\ncorruption of the DACL, which then gets sent to the server. This is not\nan out-of-bounds write as the allocation now covers the worst-case\nexpansion, so writes will always go into the buffer.\n\nAdjust the code to use a u32 internally and return -EOVERFLOW in the\noverflow case. The operation must be refused, because a DACL can only\nhold 2^16-1 bytes on the wire and larger DACLs cannot be represented.\n\nset_chmod_dacl() carries the same pattern and is fixed the same way. It\nonly wraps once the source DACL comes within roughly 380 bytes of the\n64K ceiling, but the failure mode is identical.","source":"cvelist"}],"published":"2026-09-25T10:21:48.866Z","modified":"2026-10-30T13:21:08.107Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"f5065508897a922327f32223082325d10b069ebc","fixed":"f033d6e5aadf3e8c6a12873110557ed40cd71388","status":"affected"},{"type":"git","introduced":"f5065508897a922327f32223082325d10b069ebc","fixed":"284877c6189fda1ac3d81771dd8482660a0c7dc1","status":"affected"},{"type":"git","introduced":"f5065508897a922327f32223082325d10b069ebc","fixed":"d433376abc47e10870ae732f89c7c1a60b199a0c","status":"affected"},{"type":"git","introduced":"f5065508897a922327f32223082325d10b069ebc","fixed":"2ef532a01f44687f5b95001e88247cf05bff9892","status":"affected"},{"type":"git","introduced":"f5065508897a922327f32223082325d10b069ebc","fixed":"ee13d687d06a6fbb2008625dd560c654231b28e0","status":"affected"},{"type":"git","introduced":"f5065508897a922327f32223082325d10b069ebc","fixed":"d05045177a855386bca5e1909e08d06290e6e3b3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"6.1.191","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.160","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.112","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.53","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.7","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f033d6e5aadf3e8c6a12873110557ed40cd71388","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/284877c6189fda1ac3d81771dd8482660a0c7dc1","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d433376abc47e10870ae732f89c7c1a60b199a0c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2ef532a01f44687f5b95001e88247cf05bff9892","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ee13d687d06a6fbb2008625dd560c654231b28e0","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d05045177a855386bca5e1909e08d06290e6e3b3","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-97559","url":"https://www.cve.org/CVERecord?id=CVE-2026-97559","licence":"CVE Terms of Use","modified":"2026-10-30T12:37:24.247Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-97559","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-97559","licence":"Public domain","modified":"2026-10-30T13:21:08.107Z"}],"updatedAt":"2026-11-25T22:59:40.957Z","epss":{"score":0.00212,"percentile":0.12198,"date":"2026-12-01T12:00:22.000Z"}}