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/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222632

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

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

It also:
 - adds documentation that connect and connectat(AT_FDCWD,...) are equivalent
and therefore connectat is not restricted to AF_UNIX sockets. Same for bindat.
 - 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 rights
can be used to lock down a raw, privileged socket created by a helper process.

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-222632-8-9q1QkKWqVr>