Re: Capsicum and weak libc symbols

From: Vinícius_dos_Santos_Oliveira <vini.ipsmaker_at_gmail.com>
Date: Wed, 19 Feb 2025 10:07:07 UTC
Em sex., 7 de fev. de 2025 às 13:56, Brooks Davis <brooks@freebsd.org> escreveu:
> To clarify, what do you mean by "static" in the first paragraph?

I meant /usr/lib/libc.a.

> In general I think we could make those symbols weak and expose
> __foo() where it makes sense (the __sys_ namespace is reserved for actual
> implementations of system calls.)

It works for me.

> That being said, I don't see a lot of
> value in most of the __foo() versions.  Maybe __getaddrinfo(), but the rest are
> trivial wrappers around something else.

For the cases where the __foo() version is just a trivial wrapper
around syscall() from <sys/syscall.h>, I can just use sycall()
directly and the lack of __foo() won't bother me.

> That being said, attemping to filter arguments like this is subject to
> time of check vs time of use vulnerabilities so you need to be quite
> clear what your threat model is.

I'm aware of that.


-- 
Vinícius dos Santos Oliveira
https://vinipsmaker.github.io/