<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Possibly insecure use of TCP sockets by LLDB"
   href="https://llvm.org/bugs/show_bug.cgi?id=28019">28019</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Possibly insecure use of TCP sockets by LLDB
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>demiobenour@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As I understand it LLDB uses a client-server architecture.  The client and
server communicate over TCP sockets.

This is insecure.  When the client and server are on the same machine and the
socket bound to localhost, this allows local execution of arbitrary code by an
unpriviliged and untrusted user distinct from the user LLDB is running as. 
When the client and server are on different machines, this allows for remote
execution of arbitrary code.

LLDB needs to ensure strong authentication (and, in the remote case,
encryption) of all messages.  This can be done by using SSH.  In the local
case, the best answer is to use Unix domain sockets in a secure directory (on
*nix) or named pipes with a restrictive (non-default) ACL plus authentication
of the server to the client (perhaps by demanding that the server HMAC a random
client-generated string using a key found in a temporary file only the client's
user has access to).

As I understand it LLDB uses an auth hash currently.  This works on localhost
only, but it would be better to HMAC every message.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>