Page MenuHomeFreeBSD

Allow the ND6 default route and prefix lists to be read in capability mode.
AbandonedPublic

Authored by markj on Oct 9 2018, 4:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 23 2023, 2:22 AM
Unknown Object (File)
Jun 16 2023, 4:56 AM
Subscribers

Details

Reviewers
allanjude
oshogbo
Group Reviewers
capsicum
Summary

This is needed for capsicumization of some network code. These lists
are maintained by the kernel and can be dumped by any user (e.g., with
ndp -p or ndp -r); I can't see any reason to prohibit access in cap
mode.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20094
Build 19592: arc lint + arc unit

Event Timeline

markj retitled this revision from Allow the default route and prefix lists to be read in capability mode. to Allow the ND6 default route and prefix lists to be read in capability mode..Oct 9 2018, 4:43 PM
markj added a reviewer: capsicum.

Why don't use casper for that (e.g. cap_sysctlbyname) ?

This revision is now accepted and ready to land.Oct 9 2018, 4:46 PM
oshogbo requested changes to this revision.Oct 9 2018, 4:46 PM
This revision now requires changes to proceed.Oct 9 2018, 4:46 PM

Why don't use casper for that (e.g. cap_sysctlbyname) ?

I considered that and decided not to for two reasons:

  1. These sysctls don't have names, so the existing API isn't sufficient.
  2. It seems a bit silly - what do we gain by restricting access to these read-only sysctls?

If 1) can be addressed, I'll do it, but I don't understand the threat model which makes that approach preferable.

Perhaps a topic for discussion at the Vendor/Dev Summit next week

I don't need this after all: the code which uses the sysctl value performs some other actions which require a casper helper.

We also discussed this a bit at MeetBSD; Mariusz made the point that the approach of exposing whichever random sysctls happen to be needed isn't really sustainable. I'm doing some work to flesh out cap_sysctl a bit further.