interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / om / tls / test / fuzz / fz_plant.om

36 lines · 838 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note fz_plant.om: NEGATIVE CONTROL, never shipped. fz_dns plus a planted defect: input bytes 1..4
3note equal to "OMFZ" make main write past a 4-byte array, a bounds trap (exit 103). Each byte is its
4note own branch, so a coverage-guided fuzzer climbs to it one byte at a time; a blind fuzzer needs about
5note 2^32 tries. The campaign must report this crash, or its crash detection is not trusted.
6
7fn fz_plt in view uchar * n ulong ip edit uchar * to void
8if lt n 5
9ret
10end
11if eq get in 1 79
12if eq get in 2 77
13if eq get in 3 70
14if eq get in 4 90
15put ip add n 4 0
16end
17end
18end
19end
20end
21
22fn main to int
23ip = new uchar 4 0
24in = new uchar FZCAP 0
25n = fz_read in
26fz_plt view in n ip
27if lt n 2
28ret 0
29end
30if eq and get in 0 1 1
31fz_dnsconf part in 1 sub n 1 ip
32ret 0
33end
34fz_dnsq part in 1 sub n 1
35ret 0
36end