From mboxrd@z Thu Jan 1 00:00:00 1970 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 774FC5867E7 for ; Fri, 11 Sep 2026 19:59:59 +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=1789156805; cv=none; b=qJRqrMf7tTRkTNpljqCfS7AGPptqpFw0uSNUlLgECupU6/JP5qrbYwMOqy+wkHU0t2uQKucwZF4bo4v8yV5Q0zMK8SEnWmTh1Q/LAo0YRXgqeIgUgB4xDkEevlYGUEEJCj1LUH0OU/5B5CZOh/W0LrQTLp41c9VjBqXI2Zka2iE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789156805; c=relaxed/simple; bh=ur6WR8uxI0Pn30mcDh50LWXl1gxGNadgG3vY8mI6ooE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FeZBvHr2/4p2dajKy67fjwQpLBO+zBBluquSdhRj6GAETqmVee7/J1ElW6w6Hhru9UEg3n/ZQ6fW6iKf/zaSCCYfUhn3JKZGR4Fab1pV6NXXFueNQvCzjZFngZt4rNgJYAbpXPcVTorNsdsAgOyGdYfAAqp11G/goDYftT/IFyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=J7KH0iF7; 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="J7KH0iF7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88C361F0089A; Fri, 11 Sep 2026 19:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789156799; bh=o73FPT+LwTPqbZBPtzSdLwmB7ZYa123DByrWjyfSKJ0=; h=From:To:Cc:Subject:Date:Reply-To; b=J7KH0iF7lZvrQ16r/EgvqZbvYMN9LPcoUErfRS7JlAYlbXAkoiR8eESAkgzcF1Usr neMKN9nt3AZEqavHrSezXs9B36Hce+mPkDreew6Vd8hGBGTlWL9S4Df6Wf5dmIEocT R6vY1wh/YONCRUWhqiclsdHKaslq5INwcx9mVn3w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89638: smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions Date: Fri, 11 Sep 2026 21:45:27 +0200 Message-ID: <2026091141-CVE-2026-89638-055f@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=3931; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WLXB7xQGYOmkk4NPH0PzaJRLas/rv+s+Ky636xPD3kY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIksvy4uv85+SdOqsQ+V/8Wqrk4vWzDvCKn/8+4/+Q 8YHp1i3d8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEElUZFszeudBOLMJdzEKB f5/9u0kR2dXspxjmyp4+Zrh62e+U1qD1D7oWanhuj5j5DQA= 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: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions When a file has the setuid or setgid bit set and is written to, the VFS strips those bits and issues a setattr with ATTR_KILL_SUID/ATTR_KILL_SGID together with an ATTR_MODE carrying the already-cleared mode. Both cifs_setattr_unix() and cifs_setattr_nounix() unconditionally dropped ATTR_MODE in that case: /* skip mode change if it's just for clearing setuid/setgid */ if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) attrs->ia_valid &= ~ATTR_MODE; This is fine for the default mount, where the mode is only emulated via the DOS read-only attribute and cannot represent the setuid/setgid bits anyway. However, with the "cifsacl" or "modefromsid" mount options the mode is stored on the server through an ACL (id_mode_to_cifs_acl()), with the SMB3.1.1 POSIX extensions the mode is sent to the server directly, and with the SMB1 Unix extensions (cifs_setattr_unix) the mode is sent via CIFSSMBUnixSetPathInfo(). In all those cases dropping ATTR_MODE means the cleared mode is never pushed to the server, so the setuid/setgid bit survives the write. This is a security issue: on local filesystems the setuid bit is stripped when a file is written, but over these cifs.ko mounts the bit persists on the server, potentially allowing an unexpected privilege escalation on subsequent execution. Fix this in two places: 1. cifs_setattr_nounix(): only take the "skip mode change" shortcut when the mode is emulated via the DOS read-only attribute (i.e. neither cifsacl/modefromsid nor the SMB3.1.1 POSIX extensions are in effect), so that the cleared mode is propagated to the server in the ACL / POSIX cases. 2. cifs_setattr_unix(): this function is only called when Unix extensions are in effect, so the mode is always stored on the server. Remove the shortcut entirely so that the cleared mode is always pushed. The Linux kernel CVE team has assigned CVE-2026-89638 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.24 with commit d32c4f2626acc385d5187bd5c0c24f442328dc60 and fixed in 6.18.51 with commit b10015807e4c628095d1d1d1c9307efc8cdd9e1b Issue introduced in 2.6.24 with commit d32c4f2626acc385d5187bd5c0c24f442328dc60 and fixed in 7.2.4 with commit 69bfe810ecd1e0387d8975d711cd326341d13c6e Issue introduced in 2.6.24 with commit d32c4f2626acc385d5187bd5c0c24f442328dc60 and fixed in 7.3-rc1 with commit b8e5dc4f95e5484159b343903f302eb6d783f2e6 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-89638 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/inode.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/b10015807e4c628095d1d1d1c9307efc8cdd9e1b https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6