-
Couldn't load subscription status.
- Fork 41
Description
Tested with containers/libkrun#410
There seems to be an is an issue when resolving paths of unix domain sockets, even within the guest. The problem is that we don't really resolve the paths.
The problem should be simple to reproduce, let's say we have a socket at "/tmp/my.socket". The server is bound to e.g. "/tmp/my.socket", the client changes it's working directory to "/tmp" and tries connect to "./my.socket". The client would fail to connect in that case. (In this case both client and server are even running inside the VM, which might or might not be the case for this to break).
Reproducer sock.py
(working dir /, sock.py in /):
OK:
$ /sock.py server /tmp/my.socket &
$ /sock.py client /tmp/my.socket
FAILS:
$ /sock.py server /tmp/my.socket &
$ cd tmp; /sock.py client my.socket
The simplest solution could be to resolve the path to an absolute path and send that over vsock to hijack, but there we could end up with the path being too long.