[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Potential security weakness in Guix services
From: |
Ludovic Courtès |
Subject: |
Re: Potential security weakness in Guix services |
Date: |
Sat, 06 Feb 2021 22:26:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
Maxime Devos <maximedevos@telenet.be> skribis:
> On Fri, 2021-02-05 at 10:57 +0100, Ludovic Courtès wrote:
>> Hi Maxime,
>
>>
>> > I don't know how I should implement this properly in Guile, though.
>> > In C, I would use loop using openat with O_NOFOLLOW, in combination
>> > with stat, but Guile doesn't have openat or O_NOFOLLOW.
>>
>> In this case we need a solution without openat for now. Perhaps simply
>> changing ‘mkdir-p/perms’ to ‘lstat’ components as it goes?
>
> A compromised service could create a component as a regular file or
> directory, and quickly replace it with a symlink after the activation
> gexp checks the component wasn't a symlink but before the chown or
> chmod.
I understand the TOCTTOU race. However, activation code runs in two
situations: when booting the system (before shepherd takes over), and
upon ‘guix system reconfigure’ completion.
When booting the system, there’s just no process out there to take
advantage of the race condition.
In the second case, presumably all the file name components already
exist.
Does that make sense?
>> > [...]
>> > I'll look into writing a concrete proposal for *at in guile.
>> > I'll post a link to the guile mailing list message when it has
>> > been composed and sent.
>
> Link: https://lists.gnu.org/archive/html/bug-guile/2021-02/msg00002.html
Thanks!
Ludo’.
- Re: Potential security weakness in Guix services, (continued)
- Re: Potential security weakness in Guix services, Maxime Devos, 2021/02/01
- Re: Potential security weakness in Guix services, Ludovic Courtès, 2021/02/02
- Re: Potential security weakness in Guix services, Maxime Devos, 2021/02/02
- Re: Potential security weakness in Guix services, Maxime Devos, 2021/02/02
- Re: Potential security weakness in Guix services, Ludovic Courtès, 2021/02/05
- Re: Potential security weakness in Guix services, Maxime Devos, 2021/02/05
- Re: Potential security weakness in Guix services, Maxime Devos, 2021/02/05
- Re: Potential security weakness in Guix services, Ludovic Courtès, 2021/02/06
- Re: Potential security weakness in Guix services, Maxime Devos, 2021/02/06
- Re: Potential security weakness in Guix services, Ludovic Courtès, 2021/02/10
- Re: Potential security weakness in Guix services,
Ludovic Courtès <=
- TOCTTOU race (was: Potential security weakness in Guix services), Maxime Devos, 2021/02/14
- Re: TOCTTOU race (was: Potential security weakness in Guix services), Bengt Richter, 2021/02/14
- Re: TOCTTOU race, Ludovic Courtès, 2021/02/18
- Re: TOCTTOU race, Maxime Devos, 2021/02/19
- Re: TOCTTOU race, Ludovic Courtès, 2021/02/22
- Re: TOCTTOU race, Maxime Devos, 2021/02/22
- Re: TOCTTOU race, Ludovic Courtès, 2021/02/23
- Re: TOCTTOU race, Maxime Devos, 2021/02/27
- Re: Potential security weakness in Guix services, Christopher Lemmer Webber, 2021/02/10