anakryiko / retsnoop

Investigate kernel error call stacks
BSD 2-Clause "Simplified" License
209 stars 34 forks source link

retsnoop: Pass the real envp to the sidecar #47

Closed erthalion closed 1 year ago

erthalion commented 1 year ago

In child_driver when addr2line binary is getting prepared, it's getting executed with an empty envp. This could lead to issues if the environment is messed up and retsnoop was started with envp, specifically constructed to fix this (think of libraries visibility for example).

Do an extra mile and carry around the original provided envp to pass it into fexecve.