Bug 1368938 (CVE-2016-7097) - CVE-2016-7097 kernel: Setting a POSIX ACL via setxattr doesn't clear the setgid bit
Summary: CVE-2016-7097 kernel: Setting a POSIX ACL via setxattr doesn't clear the setg...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-7097
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard: impact=moderate,public=20160526,repor...
Depends On: 1368939 1371252 1371253 1371254 1371255 1371256
Blocks: 1368940
TreeView+ depends on / blocked
 
Reported: 2016-08-22 08:00 UTC by Andrej Nemec
Modified: 2019-08-26 14:39 UTC (History)
31 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was found that when file permissions were modified via chmod and the user modifying them was not in the owning group or capable of CAP_FSETID, the setgid bit would be cleared. Setting a POSIX ACL via setxattr sets the file permissions as well as the new ACL, but doesn't clear the setgid bit in a similar way. This could allow a local user to gain group privileges via certain setgid applications.
Clone Of:
Environment:
Last Closed: 2019-06-08 02:57:34 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0817 normal SHIPPED_LIVE Moderate: kernel security, bug fix, and enhancement update 2017-03-21 13:06:51 UTC
Red Hat Product Errata RHSA-2017:1842 normal SHIPPED_LIVE Important: kernel security, bug fix, and enhancement update 2017-08-01 18:22:09 UTC
Red Hat Product Errata RHSA-2017:2077 normal SHIPPED_LIVE Important: kernel-rt security, bug fix, and enhancement update 2017-08-01 18:13:37 UTC
Red Hat Product Errata RHSA-2017:2669 normal SHIPPED_LIVE Important: kernel-rt security and bug fix update 2017-09-07 00:36:52 UTC

Description Andrej Nemec 2016-08-22 08:00:13 UTC
A vulnerability was found in the Linux kernel. When file permissions are modified via chmod and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr sets the filepermissions as well as the new ACL, but doesn't clear the setgid bit in a similar way; this allows to bypass the check in chmod.

Suggested upstream patch:

http://marc.info/?l=linux-fsdevel&m=147162313630259&w=2

http://www.spinics.net/lists/linux-fsdevel/msg101138.html

Upstream commits:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=073931017b49d9458aa351605b43a7e34598caef

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=497de07d89c1410d76a15bec2bb41f24a2a89f31

Previous suggestions:

http://www.spinics.net/lists/linux-fsdevel/msg98328.html

https://patchwork.kernel.org/patch/9137067/

https://patchwork.kernel.org/patch/9138935/

CVE request+assignment:

http://seclists.org/oss-sec/2016/q3/380

http://seclists.org/oss-sec/2016/q3/382

Comment 1 Andrej Nemec 2016-08-22 08:01:02 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1368939]

Comment 2 Andrej Nemec 2016-08-22 08:03:44 UTC
Acknowledgments:

Name: Andreas Gruenbacher (Red Hat), Jan Kara (SUSE)

Comment 3 Andrej Nemec 2016-08-29 07:12:01 UTC
Statement:

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 5. This has been rated as having Moderate security impact and is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.

This issue affects the Linux kernel packages as shipped with Red Hat Enterprise Linux 6, 7 and MRG-2. Future Linux kernel updates for the respective releases might address this issue.

Comment 9 errata-xmlrpc 2017-03-21 13:12:37 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2017:0817 https://rhn.redhat.com/errata/RHSA-2017-0817.html

Comment 10 errata-xmlrpc 2017-08-01 19:09:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:2077 https://access.redhat.com/errata/RHSA-2017:2077

Comment 11 errata-xmlrpc 2017-08-02 07:48:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2017:1842 https://access.redhat.com/errata/RHSA-2017:1842

Comment 12 errata-xmlrpc 2017-09-06 20:37:51 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise MRG 2

Via RHSA-2017:2669 https://access.redhat.com/errata/RHSA-2017:2669


Note You need to log in before you can comment on or make changes to this bug.