mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-17 10:06:51 +00:00
checkpolicy: clone level only once
In case of aliases clone the level only once to avoid leaking the fist one. Example policy: class p sid h class p{d}sensitivity d alias s0;dominance{s0}level d;level s0; Reported-by: oss-fuzz (issue #67308) Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
b106fad29f
commit
0e1e30db35
@ -1038,7 +1038,7 @@ static int clone_level(hashtab_key_t key __attribute__ ((unused)), hashtab_datum
|
||||
level_datum_t *levdatum = (level_datum_t *) datum;
|
||||
mls_level_t *level = (mls_level_t *) arg, *newlevel;
|
||||
|
||||
if (levdatum->level == level) {
|
||||
if (levdatum->notdefined && levdatum->level == level) {
|
||||
if (!levdatum->isalias) {
|
||||
levdatum->notdefined = FALSE;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user