diff options
author | rwatson <rwatson@FreeBSD.org> | 2003-06-23 01:26:34 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2003-06-23 01:26:34 +0000 |
commit | 80e2b7dc48234eba1ff0da80571d2c0354a353b9 (patch) | |
tree | 92d01b6fe3965640d61d19263fdb1f40b50d0183 /sys/security/mac_test/mac_test.c | |
parent | b205310e4310331bdb7215e20334462aef1a80c4 (diff) | |
download | FreeBSD-src-80e2b7dc48234eba1ff0da80571d2c0354a353b9.zip FreeBSD-src-80e2b7dc48234eba1ff0da80571d2c0354a353b9.tar.gz |
Redesign the externalization APIs from the MAC Framework to
the MAC policy modules to improve robustness against C string
bugs and vulnerabilities. Following these revisions, all
string construction of labels for export to userspace (or
elsewhere) is performed using the sbuf API, which prevents
the consumer from having to perform laborious and intricate
pointer and buffer checks. This substantially simplifies
the externalization logic, both at the MAC Framework level,
and in individual policies; this becomes especially useful
when policies export more complex label data, such as with
compartments in Biba and MLS.
Bundled in here are some other minor fixes associated with
externalization: including avoiding malloc while holding the
process mutex in mac_lomac, and hence avoid a failure mode
when printing labels during a downgrade operation due to
the removal of the M_NOWAIT case.
This has been running in the MAC development tree for about
three weeks without problems.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/security/mac_test/mac_test.c')
-rw-r--r-- | sys/security/mac_test/mac_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/security/mac_test/mac_test.c b/sys/security/mac_test/mac_test.c index 2b13379..7948646 100644 --- a/sys/security/mac_test/mac_test.c +++ b/sys/security/mac_test/mac_test.c @@ -531,7 +531,7 @@ mac_test_destroy_vnode_label(struct label *label) static int mac_test_externalize_label(struct label *label, char *element_name, - char *element_data, size_t size, size_t *len, int *claimed) + struct sbuf *sb, int *claimed) { atomic_add_int(&externalize_count, 1); |