[Bug 212167] listen() system call succeeds for a locally bound UNIX-domain datagram-oriented socket
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Aug 26 03:21:44 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=212167
Bug ID: 212167
Summary: listen() system call succeeds for a locally bound
UNIX-domain datagram-oriented socket
Product: Base System
Version: 10.3-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: arseny.vakhrushev at gmail.com
Created attachment 174083
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=174083&action=edit
Simple program that illustrates the bug
FreeBSD 10.3-RELEASE-p4:
While messing with UNIX-domain sockets (AF_LOCAL), I've noticed that the
listen() system call succeeds for a locally bound datagram-oriented
(SOCK_DGRAM) socket on FreeBSD while legitimately failing on other systems
since datagram sockets can't be in a listening state. Seemed like not a big
deal first but eventually led to some undefined behaviour (which I wasn't able
to reproduce as a separate test-case unfortunately).
Nevertheless, expected behaviour would be to fail with EOPNOTSUPP or a similar
error code.
Also, please note that no such unexpected behaviour is observed for UDP sockets
(AF_INET and AF_INET6). The bug seems to affect only UNIX sockets (AF_LOCAL).
See attached a simple program that illustrates the bug.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list