Page MenuHomeFreeBSD

tests: Add ktrace capability violation test cases
ClosedPublic

Authored by jfree on Jun 20 2023, 10:10 PM.
Referenced Files
Unknown Object (File)
Wed, Nov 13, 11:52 PM
Unknown Object (File)
Fri, Nov 8, 11:32 AM
Unknown Object (File)
Sat, Nov 2, 2:06 PM
Unknown Object (File)
Sat, Nov 2, 2:06 PM
Unknown Object (File)
Sun, Oct 27, 4:44 PM
Unknown Object (File)
Sun, Oct 27, 12:26 PM
Unknown Object (File)
Oct 18 2024, 9:09 AM
Unknown Object (File)
Oct 17 2024, 8:49 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 Skipped
Unit
Tests Skipped

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.Apr 7 2024, 11:58 PM
This revision was automatically updated to reflect the committed changes.