Date: Fri, 26 Aug 2016 03:21:44 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 212167] listen() system call succeeds for a locally bound UNIX-domain datagram-oriented socket Message-ID: <bug-212167-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D212167 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@FreeBSD.org Reporter: arseny.vakhrushev@gmail.com Created attachment 174083 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D174083&action= =3Dedit 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 a= ble to reproduce as a separate test-case unfortunately). Nevertheless, expected behaviour would be to fail with EOPNOTSUPP or a simi= lar error code. Also, please note that no such unexpected behaviour is observed for UDP soc= kets (AF_INET and AF_INET6). The bug seems to affect only UNIX sockets (AF_LOCAL= ). See attached a simple program that illustrates the bug. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-212167-8>
