Page MenuHomeFreeBSD

kern: Fix credentials leaks on RACCT but no RCTL
Needs ReviewPublic

Authored by olce on Wed, Oct 29, 8:52 PM.
Tags
None
Referenced Files
F134132197: D53456.id165359.diff
Fri, Oct 31, 1:09 AM
F134107168: D53456.id.diff
Thu, Oct 30, 8:08 PM
F134107130: D53456.id165359.diff
Thu, Oct 30, 8:08 PM
F134082502: D53456.diff
Thu, Oct 30, 3:12 PM
F134077583: D53456.id165359.diff
Thu, Oct 30, 2:16 PM
F134077581: D53456.id.diff
Thu, Oct 30, 2:16 PM
F134075380: D53456.diff
Thu, Oct 30, 1:58 PM
Unknown Object (File)
Thu, Oct 30, 6:40 AM
Subscribers

Details

Reviewers
kevans
kib
Summary

Affected system calls: setuid(), setreuid(), setresuid(), jail_attach(),
setloginclass().

In these system calls, the crhold() calls that, on RACCT, make the
just-installed process credentials survive a concurrent change of the
same credentials just after PROC_UNLOCK() were not matched by
a corresponding crfree() when RCTL is off. In fact, in that latter
case, they are simply not necessary, so wrap them with '#ifdef RCTL'
stances. 'kern_rctl.c' causes a compile error if RACCT is not defined
but RCTL is, so ease reading by not nesting '#ifdef's.

Diff Detail

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