* [LTP] [PATCH] mknod03: Skip S_ISGID check on files created by non-group members.
@ 2018-08-03 15:22 Sandeep Patil
2018-08-03 15:32 ` Jan Stancek
0 siblings, 1 reply; 2+ messages in thread
From: Sandeep Patil @ 2018-08-03 15:22 UTC (permalink / raw)
To: ltp
0fa3ecd87848 ("Fix up non-directory creation in SGID directories") fixes
problem described in CVE-2018-13405. This commit is backported to older
streams as well.
This patch removes S_ISGID check for files created by non-group members
in LTP tests mknod03. Basically, does the same thing as commit
'3c87ef2961' for mknod03 test.
Signed-off-by: Sandeep Patil <sspatil@google.com>
---
testcases/kernel/syscalls/mknod/mknod03.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/testcases/kernel/syscalls/mknod/mknod03.c b/testcases/kernel/syscalls/mknod/mknod03.c
index 2af66f78c..7ecadb5b3 100644
--- a/testcases/kernel/syscalls/mknod/mknod03.c
+++ b/testcases/kernel/syscalls/mknod/mknod03.c
@@ -142,14 +142,11 @@ int main(int ac, char **av)
fflag = 0;
}
- /* Verify mode permissions of node */
- if (!(buf.st_mode & S_ISGID)) {
- tst_resm(TFAIL,
- "%s: Incorrect modes, setgid bit not "
- "set", node_name);
- /* unset flag as functionality fails */
- fflag = 0;
- }
+ /*
+ * Skip S_ISGID check
+ * 0fa3ecd87848 ("Fix up non-directory creation in SGID directories")
+ * clears S_ISGID for files created by non-group members
+ */
/* Verify group ID */
if (buf.st_gid != group2_gid) {
--
2.18.0.597.ga71716f1ad-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] mknod03: Skip S_ISGID check on files created by non-group members.
2018-08-03 15:22 [LTP] [PATCH] mknod03: Skip S_ISGID check on files created by non-group members Sandeep Patil
@ 2018-08-03 15:32 ` Jan Stancek
0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2018-08-03 15:32 UTC (permalink / raw)
To: ltp
----- Original Message -----
> 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") fixes
> problem described in CVE-2018-13405. This commit is backported to older
> streams as well.
>
> This patch removes S_ISGID check for files created by non-group members
> in LTP tests mknod03. Basically, does the same thing as commit
> '3c87ef2961' for mknod03 test.
>
> Signed-off-by: Sandeep Patil <sspatil@google.com>
Pushed.
Regards,
Jan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-03 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-03 15:22 [LTP] [PATCH] mknod03: Skip S_ISGID check on files created by non-group members Sandeep Patil
2018-08-03 15:32 ` Jan Stancek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox