Page MenuHomeFreeBSD

tests: Add ktrace capability violation test cases
ClosedPublic

Authored by jfree on Jun 20 2023, 10:10 PM.
Referenced Files
F82412871: D40682.diff
Sun, Apr 28, 9:10 AM
Unknown Object (File)
Sun, Apr 21, 12:37 AM
Unknown Object (File)
Mon, Apr 8, 1:56 AM
Unknown Object (File)
Mar 13 2024, 7:28 PM
Unknown Object (File)
Jan 31 2024, 10:00 PM
Unknown Object (File)
Jan 10 2024, 10:32 PM
Unknown Object (File)
Jan 2 2024, 12:53 PM
Unknown Object (File)
Dec 20 2023, 3:31 AM

Details

Summary
tests: Add ktrace capability violation test cases

Introduce regression tests for ktrace(2) that target capability
violations.

These test cases ensure that ktrace(2) records these violations:
- CAPFAIL_NOTCAPABLE
- CAPFAIL_INCREASE
- CAPFAIL_SYSCALL
- CAPFAIL_SIGNAL
- CAPFAIL_PROTO
- CAPFAIL_SOCKADDR
- CAPFAIL_NAMEI
- CAPFAIL_CPUSET

A portion of these test cases create processes that do NOT enter
capability mode, but raise violations. This is intended behavior.
Users may run `ktrace -t p` on non-Capsicumized programs to detect
violations that would occur if the process were in capability mode.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Use cap_svflags instead of cap_flags when determining kernel ABI with syscallabi().

Fix formatting issue in license text

This revision is now accepted and ready to land.Jan 18 2024, 3:46 PM
  • Rename all instances of CAPFAIL_VFS to CAPFAIL_NAMEI
  • Rebase on main after several months
This revision now requires review to proceed.Mar 10 2024, 4:20 AM
This revision was not accepted when it landed; it landed in state Needs Review.Sun, Apr 7, 11:58 PM
This revision was automatically updated to reflect the committed changes.