Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-89638

Опубликовано: 11 сент. 2026
Источник: redhat
CVSS3: 7.8
EPSS Низкий

Описание

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.

    A flaw was found in the Linux kernel's Server Message Block (SMB) client. When a file with the setuid or setgid bit is written to on certain Common Internet File System (CIFS) mounts (specifically those using 'cifsacl', 'modefromsid' options, or SMB3.1.1 POSIX extensions), the kernel fails to properly clear these bits on the server. This oversight allows the setuid/setgid bits to persist, which could enable a local attacker to achieve unexpected privilege escalation upon subsequent execution of the affected file.

Отчет

This vulnerability is rated as an Important severity flaw because an authenticated local user with write permissions to an executable on an affected network share could modify the file while retaining elevated privileges, resulting in local privilege escalation to root or another user. Standard CIFS mounts in Red Hat Enterprise Linux emulate file modes using DOS attributes and are unaffected by default. Risk is confined to environments utilizing advanced permission mapping options, such as cifsacl, modefromsid, or POSIX extensions, where users possess write access to binaries executed with elevated capabilities.

Меры по смягчению последствий

Mount SMB/CIFS shares with the nosuid mount option to prevent setuid and setgid binaries from executing with elevated permissions, or prevent the cifs module from loading if network SMB shares are not needed.

  1. Apply nosuid to an active mount point:
mount -o remount,nosuid /path/to/cifs/mount
  1. Persist this setting by ensuring nosuid is present in the mount options within /etc/fstab:
//server/share /mnt/cifs cifs credentials=/etc/samba/creds,nosuid 0 0
  1. Alternatively, if CIFS mounts are not required on the system, disable autoloading of the kernel module:
echo "install cifs /bin/true" > /etc/modprobe.d/cifs.conf

Caveats: Enforcing nosuid prevents any executable located on the mount point from running with elevated setuid or setgid privileges. Blacklisting the cifs module prevents all SMB/CIFS network file systems from mounting. Remounting filesystems can disrupt ongoing read and write operations.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 9kernel-rtAffected
Red Hat Enterprise Linux 10kernelFixedRHSA-2026:9156528.10.2026
Red Hat Enterprise Linux 8kernel-rtFixedRHSA-2026:8908224.10.2026
Red Hat Enterprise Linux 8kernelFixedRHSA-2026:8908324.10.2026
Red Hat Enterprise Linux 9kernelFixedRHSA-2026:9036526.10.2026
Red Hat Enterprise Linux 9kernelFixedRHSA-2026:9036526.10.2026
Shadow Migration Toolkit for Virtualization for RHEL 10kernelFixedRHSA-2026:9156528.10.2026

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-281
https://bugzilla.redhat.com/show_bug.cgi?id=2532122kernel: smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions

EPSS

Процентиль: 7%
0.00178
Низкий

7.8 High

CVSS3

Связанные уязвимости

CVSS3: 7.8
ubuntu
около 2 месяцев назад

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 e...

CVSS3: 7.8
nvd
около 2 месяцев назад

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

CVSS3: 8.4
msrc
около 2 месяцев назад

smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions

CVSS3: 7.8
debian
около 2 месяцев назад

In the Linux kernel, the following vulnerability has been resolved: s ...

CVSS3: 7.8
github
около 2 месяцев назад

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 SM...

EPSS

Процентиль: 7%
0.00178
Низкий

7.8 High

CVSS3

Уязвимость CVE-2026-89638 в Red Hat CVE — exploitDog