<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Nov 28, 2024 at 11:03 AM Christos Zoulas <<a href="mailto:christos@zoulas.com">christos@zoulas.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hmm, getrandom is already allowed... prctl is dangerous to allow its general use. There is a more specific rule already there. Perhaps add to that? rseq is fine.<br></blockquote><div><br></div><div><br></div><div>Maybe making it return EPERM and continue is also fine. glibc uses this call to set various VMAs names to ease debugging or analysis by humans.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
christos<br>
<br>
> On Nov 8, 2024, at 2:42 AM, Werner Fink <<a href="mailto:werner@suse.de" target="_blank">werner@suse.de</a>> wrote:<br>
> <br>
> From: Cristian Rodríguez <<a href="mailto:crrodriguez@opensuse.org" target="_blank">crrodriguez@opensuse.org</a>><br>
> <br>
> glibc uses getrandom in malloc, rseq, and prctl in various other<br>
> places, allow these syscalls in seccomp filter.<br>
> <br>
> ```<br>
> export GLIBC_TUNABLES=glibc.mem.decorate_maps=1<br>
> make check<br>
> ```<br>
> <br>
> Signed-off-by: Werner Fink <<a href="mailto:werner@suse.de" target="_blank">werner@suse.de</a>><br>
> ---<br>
> src/seccomp.c | 3 +++<br>
> 1 file changed, 3 insertions(+)<br>
> <br>
> diff --git a/src/seccomp.c b/src/seccomp.c<br>
> index ce824330..8a2c8a4c 100644<br>
> --- a/src/seccomp.c<br>
> +++ b/src/seccomp.c<br>
> @@ -80,6 +80,9 @@ enable_sandbox(void)<br>
> if (ctx == NULL)<br>
> return -1;<br>
> <br>
> + ALLOW_RULE(prctl);<br>
> + ALLOW_RULE(getrandom);<br>
> + ALLOW_RULE(rseq);<br>
> ALLOW_RULE(access);<br>
> ALLOW_RULE(brk);<br>
> ALLOW_RULE(close);<br>
> -- <br>
> 2.43.0<br>
> <br>
> -- <br>
> File mailing list<br>
> <a href="mailto:File@astron.com" target="_blank">File@astron.com</a><br>
> <a href="https://mailman.astron.com/mailman/listinfo/file" rel="noreferrer" target="_blank">https://mailman.astron.com/mailman/listinfo/file</a><br>
<br>
</blockquote></div></div>