You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some programs are enforcing runtime isolation upon themselves at some point in their runtime (Via seccomp, pledge, landlock, etc).
This usually involves preventing any access to the host filesystem, and some other elaborate ways to limit interaction with the rest of the system and contain any possible vulnerability.
Such programs may wish to still be able to perform symbolized backtraces after isolation has been enforced. My RVVM project is one example, but there are likely more.
This requires that no FS access is done when backtracing, and all debug/stack unwinding information is preloaded at initialization stage somewhere early before isolation is enforced.
Currently it is possible to work around this by issuing a dummy symbolized stacktrace at initialization stage, which doesn't need to be visible to the user. This at least works on Linux with seccomp:
However, I have not tested that it works under OpenBSD + pledge.
It would be nice if libbacktrace explicitly documented it's behavior in regard to filesystem access and potentially unavailable syscalls.
Additionally, it should explicitly preload all debug/unwind information on backtrace_create_state() call without need to perform dunny backtrace workaround, or introduce backtrace_preload_debug_info() call which should be called after all shared libraries of interest are loaded.
The text was updated successfully, but these errors were encountered:
What?
Some programs are enforcing runtime isolation upon themselves at some point in their runtime (Via seccomp, pledge, landlock, etc).
This usually involves preventing any access to the host filesystem, and some other elaborate ways to limit interaction with the rest of the system and contain any possible vulnerability.
Such programs may wish to still be able to perform symbolized backtraces after isolation has been enforced. My RVVM project is one example, but there are likely more.
This requires that no FS access is done when backtracing, and all debug/stack unwinding information is preloaded at initialization stage somewhere early before isolation is enforced.
Currently it is possible to work around this by issuing a dummy symbolized stacktrace at initialization stage, which doesn't need to be visible to the user. This at least works on Linux with seccomp:
https://github.com/LekKit/RVVM/blob/b87a8ab9052e2063297a1cd6aa1a981d5a56e90a/src/stacktrace.c#L126
However, I have not tested that it works under OpenBSD + pledge.
It would be nice if
libbacktrace
explicitly documented it's behavior in regard to filesystem access and potentially unavailable syscalls.Additionally, it should explicitly preload all debug/unwind information on
backtrace_create_state()
call without need to perform dunny backtrace workaround, or introducebacktrace_preload_debug_info()
call which should be called after all shared libraries of interest are loaded.The text was updated successfully, but these errors were encountered: