Skip to content

Commit 024d30e

Browse files
committed
2 parents b6016a4 + fc90350 commit 024d30e

416 files changed

Lines changed: 155 additions & 111 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

fuzz/bintest/mruby-cbor-fuzzer.rb

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"-dict=#{DICT_FILE}",
1515
"-jobs=7",
1616
"-artifact_prefix=#{findings_dir}/",
17-
"-max_len=4096",
18-
"-ignore_ooms=0"
17+
"-max_len=65536",
18+
"-ignore_ooms=0",
19+
"-use_value_profile=1"
1920
]
2021

2122
Dir.chdir(findings_dir) do
@@ -30,9 +31,16 @@
3031
end
3132
end
3233

33-
sleep 0.1 until (0..6).all? { |n| File.exist?(File.join(findings_dir, "fuzz-#{n}.log")) }
34+
sleep 2
35+
actual_workers = Dir[File.join(findings_dir, 'fuzz-*.log')].map { |f|
36+
File.basename(f)[/\d+/].to_i
37+
}.sort
3438

35-
threads = (0..6).map do |n|
39+
$stderr.puts "Detected #{actual_workers.size} workers: #{actual_workers.inspect}"
40+
41+
sleep 0.1 until actual_workers.all? { |n| File.exist?(File.join(findings_dir, "fuzz-#{n}.log")) }
42+
43+
threads = actual_workers.map do |n|
3644
log = File.join(findings_dir, "fuzz-#{n}.log")
3745
Thread.new do
3846
File.open(log) do |f|
@@ -46,17 +54,17 @@
4654
end
4755

4856
loop do
49-
done = (0..6).count do |n|
57+
done = actual_workers.count do |n|
5058
log = File.join(findings_dir, "fuzz-#{n}.log")
5159
File.exist?(log) && File.read(log) =~ /Done \d+|SUMMARY:/
5260
end
53-
break if done == 16
61+
break if done == actual_workers.size
5462
sleep 5
5563
end
5664

5765
threads.each(&:kill)
5866

59-
crashes = (0..6).select do |n|
67+
crashes = actual_workers.select do |n|
6068
log = File.join(findings_dir, "fuzz-#{n}.log")
6169
File.exist?(log) && File.read(log).include?('SUMMARY:')
6270
end

fuzz/cbor.dict

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,3 +107,36 @@
107107
"\xfb\x7f\xf8\x00\x00\x00\x00\x00\x00"
108108
"\xfb\xff\xf0\x00\x00\x00\x00\x00\x00"
109109
"\xfb\x80\x00\x00\x00\x00\x00\x00\x00"
110+
111+
"\xc2\x41\x01"
112+
"\xc3\x41\x01"
113+
"\xd8\x1c\x81\x00"
114+
"\xd8\x1d\x82\x00\x01"
115+
"\xd8\x1d\x82\x41\x00\x42\x00\x00"
116+
117+
"\xd8\x1c\x01"
118+
"\xd8\x1d\x00"
119+
"\xd8\x1d\x01"
120+
"\xd8\x1d\xff"
121+
122+
"\x81\x81\x81\x80"
123+
"\xa1\x01\xa1\x01\xa0"
124+
"\x82\x01\x82\x02\x80"
125+
126+
"\xa1\x61\x61\x01"
127+
"\xa1\x41\x00\x01"
128+
"\xa1\xf4\x01"
129+
"\xa1\xf6\x01"
130+
131+
"\xc2\x49\x01\x00\x00\x00\x00\x00\x00\x00\x00"
132+
"\xc3\x49\x01\x00\x00\x00\x00\x00\x00\x00\x00"
133+
134+
"\xf9\x00\x01"
135+
"\xfa\x00\x00\x00\x01"
136+
"\xfb\x00\x00\x00\x00\x00\x00\x00\x01"
137+
138+
"\xff"
139+
"\x5f\xff"
140+
"\x7f\xff"
141+
"\x9f\xff"
142+
"\xbf\xff"
57 Bytes
Binary file not shown.
-937 Bytes
Binary file not shown.
3.12 KB
Binary file not shown.

fuzz/corpus/04453e00259256d85b29d42740b11eb42521b82a

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
�;���ꍍ��;��fi����;����ꍍ��;����f�rf��;���ꍍ��;��W��f��&;���ꍍ��;��������;����rf��;�������;���r����;����?���&;������� ;�����]�;����n���;������:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
�C��
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
��OE��۸�

fuzz/corpus/06df921005040d49d406841b26a0587045b26c3d

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)