This is the mail archive of the
mailing list for the GCC project.
ada/6717: Race condition in GNAT.Sockets.Create_Selector
- From: fw at deneb dot enyo dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 18 May 2002 12:21:42 -0000
- Subject: ada/6717: Race condition in GNAT.Sockets.Create_Selector
- Reply-to: fw at deneb dot enyo dot de
>Synopsis: Race condition in GNAT.Sockets.Create_Selector
>Arrival-Date: Sat May 18 05:26:02 PDT 2002
>Release: GCC 3.1, mainline
Any platform that supports GNAT.Sockets.
Create_Selector creates a signalling socket in an unsafe way. A malicious local user (or, if the host implements a sufficiently weak end system model, someone on the local network) can connect to the newly created socket before the application itself, thereby disrupting normal operation.
Switch back to using pipes instead sockets for signalling, as in GNAT 3.14p.
On platforms which do not have pipes, use UDP for signalling, and add some kind of check that the triggering
UDP packet really originated from the program itself.