Jan Kara
0c452d7fdc
BACKPORT: posix_acl: Clear SGID bit when setting file permissions
...
(cherry pick from commit 073931017b )
When file permissions are modified via chmod(2) 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(2) sets the file
permissions 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(2). Fix that.
NB: conflicts resolution included extending the change to all visible
users of the near deprecated function posix_acl_equiv_mode
replaced with posix_acl_update_mode. We did not resolve the ACL
leak in this CL, require additional upstream fixes.
References: CVE-2016-7097
Reviewed-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Jeff Layton <jlayton@redhat.com >
Signed-off-by: Jan Kara <jack@suse.cz >
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com >
Bug: 32458736
2017-04-05 security patch level
Change-Id: I19591ad452cc825ac282b3cfd2daaa72aa9a1ac1
2017-05-23 14:27:33 +08:00
..
2017-05-23 14:27:33 +08:00
2015-03-04 11:26:46 -08:00
2015-05-12 15:18:24 +08:00
2015-05-28 21:51:06 -04:00
2015-04-29 10:34:00 +02:00
2015-03-04 11:26:46 -08:00
2013-03-03 19:36:31 -08:00
2017-05-23 14:27:33 +08:00
2013-04-09 14:12:56 -04:00
2016-10-21 11:27:28 +08:00
2016-10-21 11:27:28 +08:00
2015-05-12 15:18:24 +08:00
2013-11-29 11:11:53 -08:00
2015-03-04 11:26:46 -08:00
2015-05-12 15:18:24 +08:00
2016-10-07 21:31:52 +08:00
2013-05-01 14:08:52 -07:00
2017-05-23 14:26:40 +08:00
2016-03-16 08:41:37 -07:00
2015-03-04 11:26:46 -08:00
2016-10-21 11:27:28 +08:00
2015-05-12 15:18:24 +08:00
2017-05-23 14:27:33 +08:00
2017-05-23 14:27:33 +08:00
2017-05-23 14:27:33 +08:00
2017-05-23 14:27:33 +08:00
2017-03-13 10:31:42 +08:00
2015-03-04 11:26:46 -08:00
2016-02-19 14:22:41 -08:00
2016-10-21 11:27:28 +08:00
2017-05-23 14:27:33 +08:00
2015-10-14 13:41:57 -07:00
2015-10-14 13:41:57 -07:00
2016-03-03 15:06:23 -08:00
2015-10-14 13:41:57 -07:00
2013-11-08 21:34:05 +08:00
2014-04-23 17:03:01 -07:00
2016-06-07 10:42:53 +02:00
2013-11-08 21:34:05 +08:00
2016-10-21 11:27:28 +08:00
2017-05-23 14:27:33 +08:00
2017-05-23 14:27:33 +08:00
2016-03-03 15:06:20 -08:00
2015-05-28 21:51:06 -04:00
2015-03-04 11:26:46 -08:00
2015-05-12 15:18:24 +08:00
2016-10-21 14:01:40 +08:00
2015-03-16 15:52:47 +08:00
2016-10-07 21:31:52 +08:00
2013-11-08 21:33:42 +08:00
2016-10-21 11:27:28 +08:00
2015-05-28 21:51:06 -04:00
2017-05-23 14:27:33 +08:00
2015-06-05 23:19:54 -07:00
2015-03-04 11:26:46 -08:00
2017-01-06 19:41:44 +08:00
2016-10-21 11:27:28 +08:00
2015-03-04 11:26:46 -08:00
2015-03-04 11:26:46 -08:00
2015-01-29 17:40:57 -08:00
2013-11-08 21:34:05 +08:00
2017-05-23 14:27:33 +08:00
2015-03-04 11:26:46 -08:00
2016-07-11 13:03:28 -07:00
2015-03-04 11:27:29 -08:00
2015-09-01 11:11:27 +08:00
2016-10-07 21:31:52 +08:00
2016-10-21 11:27:28 +08:00
2016-10-07 21:31:52 +08:00
2015-03-04 11:26:46 -08:00
2017-05-23 14:27:33 +08:00
2017-01-09 10:10:02 +08:00
2016-09-28 14:41:32 -07:00
2013-05-01 17:51:54 -07:00
2013-05-02 10:16:16 -07:00
2016-02-19 14:22:41 -08:00
2013-04-29 15:40:23 -04:00
2013-11-08 21:34:05 +08:00
2013-11-08 21:34:05 +08:00
2014-03-23 21:38:21 -07:00
2013-10-05 07:13:09 -07:00
2016-10-21 10:44:06 +08:00
2016-10-21 11:27:28 +08:00
2014-09-11 17:21:24 +00:00
2013-11-08 21:34:05 +08:00
2015-03-04 11:19:34 -08:00
2015-10-01 12:07:32 +02:00
2016-08-27 11:39:59 +02:00
2014-02-13 13:48:00 -08:00
2016-11-13 11:51:28 +08:00
2013-11-25 11:05:09 -08:00
2015-08-14 09:55:00 -07:00
2015-06-05 23:20:00 -07:00
2015-07-03 19:48:08 -07:00
2014-02-22 12:41:25 -08:00
2013-03-03 19:36:31 -08:00
2013-03-01 23:51:07 -05:00
2016-10-21 11:27:28 +08:00
2017-05-23 14:27:33 +08:00
2016-10-21 11:27:28 +08:00
2015-07-03 19:48:08 -07:00
2016-10-21 11:27:28 +08:00
2016-03-21 21:00:08 -07:00
2013-04-30 17:04:04 -07:00
2015-04-29 10:34:00 +02:00
2016-03-09 15:31:53 -08:00
2016-03-21 21:00:08 -07:00
2014-02-06 11:08:16 -08:00
2016-09-28 14:41:32 -07:00
2015-01-08 09:58:16 -08:00
2015-07-03 19:48:08 -07:00
2016-08-21 23:22:36 +02:00
2013-05-31 15:16:33 -04:00
2013-05-01 17:51:54 -07:00
2017-05-23 14:27:33 +08:00
2014-02-13 13:48:00 -08:00
2015-03-04 11:19:34 -08:00
2013-07-01 15:45:28 -07:00
2014-09-08 12:05:48 +01:00
2015-08-16 20:51:42 -07:00
2016-06-07 10:42:46 +02:00
2015-01-29 17:40:57 -08:00
2013-11-08 21:34:05 +08:00
2016-10-21 11:27:28 +08:00
2013-03-03 22:46:22 -05:00
2013-12-13 23:04:58 +00:00