From ac015a3996e894754350ea8ae97e66644899a2c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 12 May 2023 11:29:59 +0200 Subject: [PATCH] libsepol: validate: check low category is not bigger than high MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian Göttsche Acked-by: James Carter --- libsepol/src/policydb_validate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c index e0d290ff..b34f83ec 100644 --- a/libsepol/src/policydb_validate.c +++ b/libsepol/src/policydb_validate.c @@ -545,6 +545,8 @@ static int validate_mls_semantic_cat(const mls_semantic_cat_t *cat, const valida goto bad; if (validate_value(cat->high, cats)) goto bad; + if (cat->low > cat->high) + goto bad; } return 0;