Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Nov 2017 15:42:34 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 222632] connect(2) not available in capability mode
Message-ID:  <bug-222632-8-9q1QkKWqVr@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-222632-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-222632-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D222632

--- Comment #18 from Jan Kokem=C3=BCller <jan.kokemueller@gmail.com> ---
Created attachment 187942
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D187942&action=
=3Dedit
Disallow connectat/bindat AT_FDCWD in capabilities mode

Here is a patch that disables connectat/bindat in capabilities mode when ca=
lled
with the AT_FDCWD parameter.

It also:
 - adds documentation that connect and connectat(AT_FDCWD,...) are equivale=
nt
and therefore connectat is not restricted to AF_UNIX sockets. Same for bind=
at.
 - adds documentation that CAP_BIND and CAP_CONNECT are useless in cap mode
 - adds some tests

Maybe there is still a use case for CAP_CONNECT/CAP_BIND: I think those rig=
hts
can be used to lock down a raw, privileged socket created by a helper proce=
ss.

--=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-222632-8-9q1QkKWqVr>