Page MenuHomeFreeBSD

socket: Pass capsicum rights down to socket option handlers
ClosedPublic

Authored by markj on Jun 21 2024, 4:48 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 4:11 PM
Unknown Object (File)
Thu, Oct 31, 4:11 PM
Unknown Object (File)
Wed, Oct 30, 4:50 PM
Unknown Object (File)
Thu, Oct 17, 5:28 AM
Unknown Object (File)
Wed, Oct 16, 2:35 PM
Unknown Object (File)
Mon, Oct 14, 2:09 AM
Unknown Object (File)
Mon, Oct 14, 2:09 AM
Unknown Object (File)
Fri, Oct 11, 3:00 PM
Subscribers

Details

Summary

One needs the CAP_GETSOCKOPT and CAP_SETSOCKOPT rights to call
getsockopt(2) and setsockopt(2) on a socket descriptor, respectively.
The syscall layer checks this, but individual socket option handlers
have no access to the file descriptor and so can't check for additional
rights, should the want to do so. In particular, a forthcoming
implementation of SO_SPLICE logically requires at least the CAP_RECV
right.

Modify the syscall layer to look up Capsicum rights on the descriptor
and pass that along to socket option handlers; this way, the handlers
can check for additional rights if they need to.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 58282
Build 55170: arc lint + arc unit