Re: [PATCH v2] unix: properly account for FDs passed over unix sockets

From: Hannes Frederic Sowa
Date: Wed Feb 03 2016 - 09:07:56 EST


On 03.02.2016 12:56, David Herrmann wrote:
However, with Hannes' revised patch, a different DoS attack against
dbus-daemon is possible. Imagine a peer that receives batches of FDs,
but never dequeues them. They will be accounted on the inflight-limit
of dbus-daemon, as such causing messages of independent peers to be
rejected in case they carry FDs.

Yes, that is true.

We also kind of have the problem with unconnected af-unix dgram sockets: if the receiver does not read the skbs on the receive queue we don't free up the sending socket's wmem, thus stop the socket from being destructed and can block the process during sendmsg on this socket. This is harder to DoS but pretty much the same schema.

Bye,
Hannes