29 lines
957 B
Diff
29 lines
957 B
Diff
From ac015a3996e894754350ea8ae97e66644899a2c4 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
|
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 <cgzones@googlemail.com>
|
|
Acked-by: James Carter <jwcart2@gmail.com>
|
|
---
|
|
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 e0d290ff32..b34f83ecb5 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;
|