[all-commits] [llvm/llvm-project] 24805c: [lldb] Use correct path for lldb-server executable...
Yuval Deutscher via All-commits
all-commits at lists.llvm.org
Tue Apr 29 15:19:42 PDT 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: 24805c2e0817e67055af85a8740f04385dfbd08a
https://github.com/llvm/llvm-project/commit/24805c2e0817e67055af85a8740f04385dfbd08a
Author: Yuval Deutscher <yuvald at sweet.security>
Date: 2025-04-29 (Tue, 29 Apr 2025)
Changed paths:
M lldb/tools/lldb-server/lldb-platform.cpp
Log Message:
-----------
[lldb] Use correct path for lldb-server executable (#131519)
Hey,
This solves an issue where running lldb-server-20 with a non-absolute
path (for example, when it's installed into `/usr/bin` and the user runs
it as `lldb-server-20 ...` and not `/usr/bin/lldb-server-20 ...`) fails
with `error: spawn_process failed: execve failed: No such file or
directory`. The underlying issue is that when run that way, it attempts
to execute a binary named `lldb-server-20` from its current directory.
This is also a mild security hazard because lldb-server is often being
run as root in the directory /tmp, meaning that an unprivileged user can
create the file /tmp/lldb-server-20 and lldb-server will execute it as
root. (although, well, it's a debugging server we're talking about, so
that may not be a real concern)
I haven't previously contributed to this project; if you want me to
change anything in the code please don't hesitate to let me know.
(cherry picked from commit 945c494e2c3c078e26ff521ef3e9455e0ff764ac)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list