Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C79D5307AC7 for ; Fri, 25 Sep 2026 10:24:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790331853; cv=none; b=EFFIT6seZ8wte8A/K3eR3slEn3jp4ljgScZPPcw6IPIfd6RublbcQ8S2NGmE9VQ4ffwF4CT6nx2G2cDaCtaFOftY+a1Zcrf2IEcIcEldkjCeBU+AyGamLcbqZOTmUFQ5P/nQldPzgfB5AFfhx+zsDQDX0/8B7OX7XrkkKpmP60U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790331853; c=relaxed/simple; bh=6lsPRTxvwGfmgn6E9I5eDslTwAq62BNnXGmiBbG8FHQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DOTWqMij1AscoWBuHQwIov413cZduhRwl739BQD1hT+6DOgp0IhrLSyKxvZGIjYneZMd7PrQlt/Ds0g9cMEPi0IWlq0Jj2R42+YK9Jk5mpgH83iSw6z2kGSKqBH59qnp4fiArEVV2WYWNyJb7+UUKmzA7imTs6xKIIa8+fO9GCg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xswXbdeo; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xswXbdeo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D5351F000FF; Fri, 25 Sep 2026 10:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790331851; bh=SvauY6m8Gi+apRsC/hEq1HIDuFsanllkYKsc6zzLw4Y=; h=From:To:Cc:Subject:Date:Reply-To; b=xswXbdeokJOw1M3ovM3hI5jepBJHN6EyHR5BbpanlhUMbYAnX4KUzCifK83IEy2Mv yBU0fim96HFfbYK2b8JvuGSfV8fbMGF3kcN2zgLAI+yX7G+oqkj4umlOr4ZdGd9yEC 9pmj2FktP+C5MLmBQP7hpKOakCTlBEB5nwHI88eA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-97555: smb: client: fix heap overflow in DACL owner/group rewrite Date: Fri, 25 Sep 2026 12:22:15 +0200 Message-ID: <2026092551-CVE-2026-97555-0eb6@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3499; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vHg0yl/Lq3V5518cT8cD5+zxfJh5tzWYxYMWlDwPnE4=; b=owGbwMvMwCRo6H6F97bub03G02pJDFnbvO0P3X/rvnGeec+BSJUlU17of2H7r6pV+OqFitvGJ KEJT+6xdMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEzq1jmKd47cWun26eNzRX eEVIWafLe0yfvZJhftSvw8Znr1wXOjB/+p6JP1zvXZ6UpQIA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: smb: client: fix heap overflow in DACL owner/group rewrite When id_mode_to_cifs_acl rewrites an existing DACL, it allocates a buffer sized according to the on-disk DACL length reported by dacl_ptr->size. However, replace_sids_and_copy_aces may rewrite each ACE with a new owner/group SID obtained from the cifs.idmap upcall. Those SIDs can have up to SID_MAX_SUB_AUTHORITIES (15) sub-authorities, making each ACE up to 76 bytes (sizeof(struct smb_ace)). If the original DACL contains short SIDs (e.g., 1 sub-authority) while the replacement SIDs are long, the rewritten ACEs overflow the allocation. Fix this by always budgeting for worst-case SID expansion: allocate sizeof(struct smb_acl) plus num_aces * sizeof(struct smb_ace), which covers the smb_acl header and room for every ACE at maximum SID size. This replaces the previous split logic that used dacl_ptr->size for cifsacl mounts but num_aces * sizeof(struct smb_ace) for mode_from_sid mounts: both paths can trigger the same rewrite and need the same headroom. KASAN reports this as: BUG: KASAN: slab-out-of-bounds in build_sec_desc+0x1e8a/0x2680 [cifs] Write of size 4 at addr ffff8881a5e25374 by task chown/5298 ... The buggy address is located 0 bytes to the right of allocated 884-byte region [ffff8881a5e25000, ffff8881a5e25374) The Linux kernel CVE team has assigned CVE-2026-97555 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit bc3e9dd9d104ca1b75644eab87b38ce8a924aef4 and fixed in 6.12.111 with commit fb736ab4fb8c4fdb8b2f9ccd3a62e03d11549ca1 Issue introduced in 5.12 with commit bc3e9dd9d104ca1b75644eab87b38ce8a924aef4 and fixed in 6.18.53 with commit 7fa84c9ca690643f429ae2709584a47e74b572c9 Issue introduced in 5.12 with commit bc3e9dd9d104ca1b75644eab87b38ce8a924aef4 and fixed in 7.2.7 with commit 2a9aee9ef5622d58d8aafaa3263b3ffe70e2d9dd Issue introduced in 5.12 with commit bc3e9dd9d104ca1b75644eab87b38ce8a924aef4 and fixed in 7.3-rc3 with commit 0ee150794c75bcd0be0e24ff3394f433cbae18cc Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-97555 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/smb/client/cifsacl.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/fb736ab4fb8c4fdb8b2f9ccd3a62e03d11549ca1 https://git.kernel.org/stable/c/7fa84c9ca690643f429ae2709584a47e74b572c9 https://git.kernel.org/stable/c/2a9aee9ef5622d58d8aafaa3263b3ffe70e2d9dd https://git.kernel.org/stable/c/0ee150794c75bcd0be0e24ff3394f433cbae18cc