From: Arun Isaac <arunisaac@systemreboot.net>
To: Maxime Devos <maximedevos@telenet.be>, 57363@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#57363] [PATCH 0/1] Set #o640 permissions for log file of shepherd service in container.
Date: Tue, 30 Aug 2022 00:45:33 +0530 [thread overview]
Message-ID: <874jxuzwru.fsf@systemreboot.net> (raw)
In-Reply-To: <f774928e-ae82-007b-bbf1-71bd23b213b1@telenet.be>
Hi Maxime,
> There is a small window during which the log file has overly-wide
> permissions, which IIUC makes the log openable when it shouldn't, which
> could later be exploited (after the daemon has been running for a while)
> to extract anything secret written to the log by the service.
True, thanks for catching that!
> Try using (close (open log-file (logior O_CREAT O_APPEND O_CLOEXEC)
> #o600)) instead, that should make things atomic.
Done. An updated patch follows.
> I do not know if clearing the log file is desired -- if so, remove
> O_APPEND, if not, keep O_APPEND.
I don't think clearing the log file is desired. Append is good, I
think. Users wouldn't want their log files overwritten everytime their
system is restarted.
Regards,
Arun
next prev parent reply other threads:[~2022-08-29 19:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 17:31 [bug#57363] [PATCH 0/1] Set #o640 permissions for log file of shepherd service in container Arun Isaac
2022-08-23 17:33 ` [bug#57363] [PATCH] shepherd: Set #o640 permissions for log file of " Arun Isaac
2022-08-26 14:48 ` [bug#57363] [PATCH 0/1] Set #o640 permissions for log file of shepherd " Maxime Devos
2022-08-29 19:15 ` Arun Isaac [this message]
2022-08-29 19:15 ` [bug#57363] [PATCH v2] shepherd: Set #o640 permissions for log file of " Arun Isaac
2022-09-02 9:21 ` Ludovic Courtès
2022-09-02 11:20 ` bug#57363: " Arun Isaac
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jxuzwru.fsf@systemreboot.net \
--to=arunisaac@systemreboot.net \
--cc=57363@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=maximedevos@telenet.be \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).