[all-commits] [llvm/llvm-project] 945c49: [lldb] Use correct path for lldb-server executable...

Yuval Deutscher via All-commits all-commits at lists.llvm.org
Mon Mar 31 08:21:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 945c494e2c3c078e26ff521ef3e9455e0ff764ac
      https://github.com/llvm/llvm-project/commit/945c494e2c3c078e26ff521ef3e9455e0ff764ac
  Author: Yuval Deutscher <yuvald at sweet.security>
  Date:   2025-03-31 (Mon, 31 Mar 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.



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