diff options
author | Mark Johnston <markj@FreeBSD.org> | 2018-08-01 03:46:07 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2018-08-01 03:46:07 +0000 |
commit | 6324de037cb6ee621855384588e11d603c931d46 (patch) | |
tree | 83314c53bb26ce1f0e9d19b9dfd623d83a65388b /sys/security/mac | |
parent | 3c09eaee95308c24632df1e978594edf46afa518 (diff) | |
download | src-6324de037cb6ee621855384588e11d603c931d46.tar.gz src-6324de037cb6ee621855384588e11d603c931d46.zip |
Notes
Diffstat (limited to 'sys/security/mac')
-rw-r--r-- | sys/security/mac/mac_framework.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index f56627c7ea0e..ecccca03e99b 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -586,7 +586,9 @@ int mac_check_structmac_consistent(struct mac *mac) { - if (mac->m_buflen > MAC_MAX_LABEL_BUF_LEN) + /* Require that labels have a non-zero length. */ + if (mac->m_buflen > MAC_MAX_LABEL_BUF_LEN || + mac->m_buflen <= sizeof("")) return (EINVAL); return (0); |