public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 1/3] security/dirtyc0w: Fix bug caused by default umask
Date: Mon, 30 Mar 2020 11:20:46 +0200	[thread overview]
Message-ID: <20200330092046.GB9845@yuki.lan> (raw)
In-Reply-To: <20200330091835.GA9845@yuki.lan>

Hi!
> > The case is only successful when system default umask is 0022.
> > When default umask is 0077 or other values, should clear current umask by umask(0) in setup().
> 
> What exactly fails in the dirtyc0w because of non-standard umask?
> 
> I can easily understand why fstat and statx fail, since we check the
> file permissions there. Ideally the failure should have been part of the
> patch description.

Looking at the code I guess that the child fails to open the file
created in parent before the setgid/setuid, something like this should
really have been part of the patch description.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2020-03-30  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30  7:27 [LTP] [PATCH v3 0/3] Fix bug caused by default umask Zou Wei
2020-03-30  7:27 ` [LTP] [PATCH v3 1/3] security/dirtyc0w: " Zou Wei
2020-03-30  9:18   ` Cyril Hrubis
2020-03-30  9:20     ` Cyril Hrubis [this message]
2020-03-30 12:33       ` Xiao Yang
2020-03-31  2:30         ` [LTP] 答复: " Zouwei
2020-03-30 12:48       ` [LTP] " Xiao Yang
2020-03-30 12:52         ` Cyril Hrubis
2020-03-30  7:27 ` [LTP] [PATCH v3 2/3] syscalls/fstat: " Zou Wei
2020-03-30  7:27 ` [LTP] [PATCH v3 3/3] syscalls/statx01: " Zou Wei
2020-03-30  7:34 ` [LTP] [PATCH v3 0/3] " Xiao Yang
2020-03-30  8:22   ` [LTP] 答复: " Zouwei
2020-03-30  8:59     ` Xiao Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200330092046.GB9845@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox