diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-03 17:10:19 -0700 |
|---|---|---|
| committer | KRIS CHEN <chenkris@google.com> | 2018-10-31 06:59:47 +0000 |
| commit | 7a2b31971357c13290f5dd62138cebb9f04449ae (patch) | |
| tree | 7fbb541fe2a542d42d19e4901948bc83179cef0e /net/lapb/lapb_subr.c | |
| parent | f483d45033ab6cbd8cea1ddab3c9484c68551a21 (diff) | |
Fix up non-directory creation in SGID directories
commit 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 upstream.
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable by non-group members should not imply
that such non-group members can magically join the group, so make sure
to clear the sgid bit on non-directories for non-members (but remember
that sgid without group execute means "mandatory locking", just to
confuse things even more).
Reported-by: Jann Horn <jannh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Bug: 113452403
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ib8065c0ab05ead9e9d38e23b95b6891ece4d99e5
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions
