Skip to content

List of detected issues

Irina Dudina edited this page Jun 28, 2024 · 8 revisions

Accidental loss of tag

Warning description Checker Explanation
Storing capabilities at unaligned addresses optin.portability.PointerAlignment CHERI C/C++ Programming Guide §4.2.2
Copying capabilities through underaligned memory optin.portability.PointerAlignment CHERI C/C++ Programming Guide §4.2.2
Capability‑unaware implementation of copy/swap routines cheri.CapabilityCopy CHERI C/C++ Programming Guide §4.2
Pointer passed through non‑capability integer type cheri.ProvenanceSource CHERI C/C++ Programming Guide §4.2.3

Provenance issues with (u)intptr_t

Warning description Checker Explanation
NULL-derived capability used as pointer cheri.ProvenanceSource CHERI C/C++ Programming Guide §4.2.3
(u)intptr_t arithmetic with ambiguous provenance source cheri.ProvenanceSource CHERI C/C++ Programming Guide §4.2.3
(u)intptr_t value with ambiguous provenance used as pointer cheri.ProvenanceSource CHERI C/C++ Programming Guide §4.2.3

CHERI‑incompatible patterns

Warning description Checker Explanation
Use fixed address alpha.core.FixedAddr
Subtraction of pointers pointing to disctinct objects alpha.core.PointerSub
CHERI-incompatible pointer arithmetic (e.g. XOR-linked lists) cheri.ProvenanceSource CHERI C/C++ Programming Guide §4.2.3

Sizeof assumptions

Warning description Checker Explanation
Allocator sizeof operand mismatch unix.MallocSizeof
Assuming sizeof(void*) <= 8 cheri.PointerSizeAssumptions

Other

Warning description Checker Explanation
Field with imprecise subobject bounds cheri.SubObjectRepresentability CHERI C/C++ Programming Guide §4.3.3, §7.5
Part of capability value used in binary operator cheri.CapabilityCopy CHERI C/C++ Programming Guide §4.6
Capability bounds should be narrowed before escape alpha.cheri.Allocation CHERI C/C++ Programming Guide §7.3

[1] Robert N. M. Watson, Alexander Richardson, Brooks Davis, John Baldwin, David Chisnall, Jessica Clarke, Nathaniel Filardo, Simon W. Moore, Edward Napierala, Peter Sewell and Peter G. Neumann. CHERI C/C++ Programming Guide. Technical Report UCAM-CL-TR-947. University of Cambridge, Computer Laboratory, 2020. https://github.com/CTSRD-CHERI/cheri-c-programming