linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Unix domain sockets missing error codes
@ 2019-11-11  8:58 Adeel Sharif
  0 siblings, 0 replies; only message in thread
From: Adeel Sharif @ 2019-11-11  8:58 UTC (permalink / raw)
  To: linux-kernel

Hello,

We are a group of people working on making Linux safe for everyone. In
hope of doing that I started testing the system caalls. The one I am
currently working on is send/write.

If send() is used to send datagrams on unix socket and the receiver
has stopped receiving, but still connected, there is a high
possibility that Linux kernel could eat up the whole system memory.
Although there is a system wide limit on write memory from wmem_max
parameter but this is sometimes also increased to system memory size
in order to avoid packet drops.

After having a look in the kernel implementation of
unix_dgram_sendmsg() it is obvious that user buffers are copied into
kernel socket buffers and they are queued to a linked list. This list
is growing without any limits. Although there is a qlen parameter but
it is never used to impose a limit on it. Could we perhaps impose a
limit on it and return an error with errcode EQUEUE_FULL or something
instead?

I don't know who is the maintainer of unix sockets. If someone knows
please let me know and I will discuss with him further.

Thank You.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-11  8:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11  8:58 Unix domain sockets missing error codes Adeel Sharif

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).