WIP: pressure-vessel: Use a shorter random string for the server socket
The AF_UNIX sockets that are used as rendezvous-point are limited to 108 bytes by the Linux kernel.
In order to be more flexible with the socket directory size, we avoid using the 36 bytes long UUID as the server socket. Instead we randomize a 12 bytes string that saves us 24 bytes, that we can spare for the socket directory, but it is still long enough to prevent a DOS attack.
Merge request reports
Activity
mentioned in merge request steamlinuxruntime!34 (closed)
Sorry, I'm not intending to land this or steamlinuxruntime!34 (closed) right now: we need a new beta before we land more stuff.
Is there a concrete issue that this solves? I thought Steam now sets
PRESSURE_VESSEL_SOCKET_DIR
for us, to a path in/tmp
that is certainly short enough?The route I'm more likely to take, as part of eventually absorbing the launcher/session functionality into the C code, is to make
PRESSURE_VESSEL_SOCKET_DIR
mandatory for "session mode", and stop trying to cope with it being attacker-controlled - effectively, it would become part of what we might call the "Steam compat protocol". That would mean we can usepressure-vessel-launcher --socket=...
and don't need random strings at all.
50 50 G_DEFINE_AUTOPTR_CLEANUP_FUNC (PvLauncher1Skeleton, g_object_unref) 51 51 #endif 52 52 53 /* Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */ 54 #define PV_UUID_STRLEN 36 53 /* Use a 12 characters long random server socket name */ 54 #define PV_SERVER_SOCKET_STRLEN 12 Merging steamlinuxruntime!53 (merged) made this relatively useless. I deprecated the
--socket-directory
option in a3ea4583 and one day I'll remove it completely.