summaryrefslogtreecommitdiff
path: root/src/misc/av/memprotectav.cil
blob: 1e89e53615c077c8c06644931b2932582940dcb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
;; SPDX-FileCopyrightText: M-BM-) 2025 Dominick Grift <dominick.grift@defensec.nl>
;; SPDX-License-Identifier: Unlicense

(class memprotect (mmap_zero))
(classorder (unordered memprotect))

(in subj

    (block mmapzero

	(macro type ((type ARG1))
	    (typeattributeset typeattr ARG1))

	(typeattribute not_typeattr)
	(typeattribute typeattr)

	(typeattributeset not_typeattr (not typeattr))

	(neverallow not_typeattr self (memprotect (mmap_zero)))))

(in subj.unconfined

    (allow typeattr self (memprotect (all)))

    (call mmapzero.type (typeattr)))