{"id":21560,"date":"2026-09-12T04:31:21","date_gmt":"2026-09-11T20:31:21","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89638"},"modified":"2026-09-12T04:31:21","modified_gmt":"2026-09-11T20:31:21","slug":"cve-2026-89638","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89638","title":{"rendered":"CVE-2026-89638 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: clear se"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>smb: client: clear setuid\/setgid bit on write with cifsacl\/modefromsid\/posix extensions<\/p>\n<p>When a file has the setuid or setgid bit set and is written to, the VFS<br \/>\nstrips those bits and issues a setattr with ATTR_KILL_SUID\/ATTR_KILL_SGID<br \/>\ntogether with an ATTR_MODE carrying the already-cleared mode.<\/p>\n<p>Both cifs_setattr_unix() and cifs_setattr_nounix() unconditionally dropped<br \/>\nATTR_MODE in that case:<\/p>\n<p>\t\/* skip mode change if it&#8217;s just for clearing setuid\/setgid *\/<br \/>\n\tif (attrs-&gt;ia_valid &amp; (ATTR_KILL_SUID|ATTR_KILL_SGID))<br \/>\n\t\tattrs-&gt;ia_valid &amp;= ~ATTR_MODE;<\/p>\n<p>This is fine for the default mount, where the mode is only emulated via<br \/>\nthe DOS read-only attribute and cannot represent the setuid\/setgid bits<br \/>\nanyway.  However, with the &#8220;cifsacl&#8221; or &#8220;modefromsid&#8221; mount options the<br \/>\nmode is stored on the server through an ACL (id_mode_to_cifs_acl()), with<br \/>\nthe SMB3.1.1 POSIX extensions the mode is sent to the server directly,<br \/>\nand with the SMB1 Unix extensions (cifs_setattr_unix) the mode is sent<br \/>\nvia CIFSSMBUnixSetPathInfo().  In all those cases dropping ATTR_MODE means<br \/>\nthe cleared mode is never pushed to the server, so the setuid\/setgid bit<br \/>\nsurvives the write.<\/p>\n<p>This is a security issue: on local filesystems the setuid bit is stripped<br \/>\nwhen a file is written, but over these cifs.ko mounts the bit persists on<br \/>\nthe server, potentially allowing an unexpected privilege escalation on<br \/>\nsubsequent execution.<\/p>\n<p>Fix this in two places:<\/p>\n<p>  1. cifs_setattr_nounix(): only take the &#8220;skip mode change&#8221; shortcut<br \/>\n     when the mode is emulated via the DOS read-only attribute (i.e.<br \/>\n     neither cifsacl\/modefromsid nor the SMB3.1.1 POSIX extensions are<br \/>\n     in effect), so that the cleared mode is propagated to the server<br \/>\n     in the ACL \/ POSIX cases.<\/p>\n<p>  2. cifs_setattr_unix(): this function is only called when Unix<br \/>\n     extensions are in effect, so the mode is always stored on the<br \/>\n     server.  Remove the shortcut entirely so that the cleared mode is<br \/>\n     always pushed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>smb: client: clear setuid\/setgid bit on write with cifsacl\/modefromsid\/posix extensions<\/p>\n<p>When a file has the setuid or setgid bit s<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-21560","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/21560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=21560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=21560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=21560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}