mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-04 20:49:53 +00:00
74d00a8dec
A CIL policy with inheritance of the form ... (blockinherit ba) (block ba (block b1 (blockinherit bb) ) (block bb (block b2 (blockinherit bc) ) (block bc (block b3 (blockinherit bd) ) (block bd (block b4 (blockinherit be) ) (block be ... will require creating 2^depth copies of the block at the bottom of the inheritance chain. This pattern can quickly consume all the memory of the system compiling this policy. The depth of the inheritance chain can be found be walking the tree up through the parents and noting how many of the parent blocks have been inherited. The number of times a block will be copied is found by counting the list of nodes in the "bi_nodes" list of the block. To minimize legitimate policies from being falsely detected as being degenerate, both the depth and breadth (number of copies) are checked and an error is given only if both exceed the limits (depth >= 12 and breadth >= 4096). This problem was found by the secilc-fuzzer. Signed-off-by: James Carter <jwcart2@gmail.com> |
||
---|---|---|
.. | ||
cil | ||
include | ||
man | ||
src | ||
tests | ||
utils | ||
.gitignore | ||
COPYING | ||
Makefile | ||
VERSION |