Page MenuHomeFreeBSD

Disable connectat/bindat with AT_FDCWD parameter in capabilities mode
ClosedPublic

Authored by jan.kokemueller_gmail.com on Apr 28 2018, 6:09 AM.
Referenced Files
F148638573: D15221.id42008.diff
Thu, Mar 19, 7:24 AM
F148638570: D15221.id42008.diff
Thu, Mar 19, 7:24 AM
F148602700: D15221.id41949.diff
Thu, Mar 19, 2:11 AM
Unknown Object (File)
Wed, Mar 18, 1:34 AM
Unknown Object (File)
Jan 10 2026, 9:24 AM
Unknown Object (File)
Nov 15 2025, 3:58 AM
Unknown Object (File)
Nov 15 2025, 1:26 AM
Unknown Object (File)
Nov 14 2025, 6:40 PM

Details

Summary

Currently it is possible to connect a socket by calling "connectat(AT_FDCWD, ...)" even in capabilties mode. This combination should probably be treated the same as a call to connect (i.e. forbidden in capabilities mode).

This patch disables connectat/bindat with AT_FDCWD in capabilities mode, fixes up the documentation and adds some tests.

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Thank you, I will try to review soon and have added some other Capsicum folks.

If you upload again please include full context, via git diff -U9999 or svn diff -x-U99999 or similar.

This revision is now accepted and ready to land.Apr 30 2018, 4:05 PM

connectat/bindat description updated in rS333119

This revision was automatically updated to reflect the committed changes.