:: Re: [DNG] Nasty Linux systemd secur…
Top Page
Delete this message
Reply to this message
Author: Enrico Weigelt, metux IT consult
Date:  
To: dng
Subject: Re: [DNG] Nasty Linux systemd security bug revealed
On 21.07.21 14:36, Didier Kryn wrote:

>     I want to add to the comments that this alloca() function has been
> added (by gcc ?) to work around a missing feature of the C language:
> dynamic allocation on the stack.


What you *actually* want is not "on stack" (directly), but automatically
freed when leaving the function scope - doing it by moving SP is just an
specific implementation. But actually a problematic one that needs great
caution: you usually don't know how much free stack you actually have.

In kernel space, we have the golden rule of not doing any larger stack
allocations, even not larger fixed sized arrays.


--mtx

--
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@??? -- +49-151-27565287