HomeFreeBSD

Require that MAC label buffers be able to store a non-empty string.

Description

Require that MAC label buffers be able to store a non-empty string.

The buffer size may be used to initialize an sbuf in
MAC_POLICY_EXTERNALIZE, and without this constraint it's possible to
trigger an assertion failure in the sbuf code. With INVARIANTS
disabled, the first attempt to write to the sbuf will fail.

Reported by: pho
Reviewed by: delphij
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D16527

Details

Provenance
markjAuthored on
Reviewer
delphij
Differential Revision
D16527: Require MAC labels to be non-zero in length.
Parents
rS337030: MFV r337029:
Branches
Unknown
Tags
Unknown