oss-sec mailing list archives

Re: Race condition between UDP bind(2) and connect(2) delivers wrong datagrams


From: Bob Friesenhahn <bfriesen () simple dallas tx us>
Date: Wed, 8 Nov 2017 13:13:20 -0600 (CST)

On Wed, 8 Nov 2017, Eric Blake wrote:

This issue is not that case because Darwin[1], DragonFly[2], FreeBSD[3],
GNU/Hurd (though by importing Linux man pages), Linux[4], NetBSD[5], and
OpenBSD[6] all document behavior compatible with POSIX[7].

It doesn't matter what the implementations document (if their
documentation is copying from POSIX), but what they actually DO.

For the purpose of this list (about security) it seems to me that the current behavior makes use of the recv(2) (or read(2)) system calls inherently insecure since there is no way to verify that a received message is from the expected source address. The only work-around is to intentionally discard messages until no more messages are available, but this may discard valid messages.

This makes most common uses of recv(2) insecure.

Bob
--
Bob Friesenhahn
bfriesen () simple dallas tx us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


Current thread: