Page MenuHomeFreeBSD

jail: Optionally allow audit session state to be configured in a jail
AcceptedPublic

Authored by markj on Mon, Aug 4, 3:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 11, 5:05 PM
Unknown Object (File)
Sun, Aug 10, 4:21 PM
Unknown Object (File)
Sat, Aug 9, 5:50 AM
Unknown Object (File)
Sat, Aug 9, 2:56 AM
Unknown Object (File)
Tue, Aug 5, 11:01 PM
Unknown Object (File)
Tue, Aug 5, 7:13 AM
Unknown Object (File)
Tue, Aug 5, 4:40 AM
Unknown Object (File)
Mon, Aug 4, 10:52 PM

Details

Reviewers
kevans
Group Reviewers
Jails
Audit
Summary

Currently it is impossible for a privileged, jailed process to set audit
session state. This can result in suprising audit event misattribution.
For example, suppose a user ssh'es into a jail and restarts a service;
normally, sshd sets audit state such that events generated by the SSH
session are attributed to the newly authenticated user, but in a jail,
the corresponding setaudit(2) call fails, so events are attributed to
the user who had started sshd in the jail (typically the user who had
started the jail itself by some means).

While this behaviour is reasonable, administrators might want to trust
the jailed sshd to reset audit state, such that the authenticated user
appears in audit logs. Add a jail knob to enable this. Add a simple
regression test.

Diff Detail

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

Event Timeline

markj requested review of this revision.Mon, Aug 4, 3:13 PM
kevans added inline comments.
usr.sbin/jail/tests/jail_basic_test.sh
311

I'd like to see a test that demonstrate that a jail-run setaudit(2) still properly gets a zone tag in its audit records, but that's more of a tests/sys/audit problem and we already know that isn't a possibility today because they're populated based on a property of the ucred, rather than audit configuration.

Not a blocker, just thinking out loud for future improvements.

This revision is now accepted and ready to land.Tue, Aug 5, 2:16 PM
jamie added a subscriber: jamie.

It looks fine from the jail side of things.