-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
91 lines (77 loc) · 7.15 KB
/
CMakeLists.txt
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
cmake_minimum_required(VERSION 2.8)
project (ConAnalysis)
#set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Debug)
find_package(LLVM CONFIG REQUIRED)
#include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(include)
add_subdirectory(lib/Misc/Inst2Int)
add_subdirectory(lib/CDG)
add_subdirectory(lib/SyncLoop)
add_subdirectory(lib/DOL)
add_subdirectory(lib/ConAnal)
add_subdirectory(TESTS/libsafe-cve-1125) # real exploit exists
add_subdirectory(TESTS/libvirt-cve-1447) # real exploit exists
add_subdirectory(TESTS/apache-21287) # concurrency bug
add_subdirectory(TESTS/apache-25520) # real exploit exists
add_subdirectory(TESTS/apache-46215) # concurrency bug
add_subdirectory(TESTS/apache-2.4.18) # concurrency bug
add_subdirectory(TESTS/mysql-24988) # concurrency bug
add_subdirectory(TESTS/mysql-35589) # concurrency bug
add_subdirectory(TESTS/memcached-1.4.25) # concurrency bug
add_subdirectory(TESTS/ssdb-1.9.2) # concurrency bug
add_subdirectory(TESTS/mongoose-3.6) # concurrency bug
add_subdirectory(TESTS/linux-4.4.1) # concurrency bug
#add_subdirectory(TESTS/freebsd-cve-3527a)
#add_subdirectory(TESTS/freebsd-osvdb-58543)
#add_subdirectory(TESTS/kernel-cve-2004-1235) # real exploit exists
# enable_testing
enable_testing()
#define a macro to simplify adding tests
macro (do_test arg result)
add_test(${arg}.test ${PROJECT_BINARY_DIR}/TESTS/${arg}/autotest.sh ${arg})
set_tests_properties (${arg}.test
PROPERTIES PASS_REGULAR_EXPRESSION ${result}
)
endmacro (do_test)
# test libsafe-cve-1125
add_test(libsafe-cve-1125.test "${PROJECT_BINARY_DIR}/TESTS/libsafe-cve-1125/autotestConAnalysis.sh" "libsafe-cve-1125" "${PROJECT_BINARY_DIR}/TESTS/libsafe-cve-1125/race_report_read.txt")
set_tests_properties (libsafe-cve-1125.test
PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 5 628 629 631 632 636 638 639 643 \\]"
)
# test libvirt-cve-1447
add_test(libvirt-cve-1447.test "${PROJECT_BINARY_DIR}/TESTS/libvirt-cve-1447/autotestConAnalysis.sh" "libvirt-cve-1447" "${PROJECT_BINARY_DIR}/TESTS/libvirt-cve-1447/race_report_read.txt")
set_tests_properties (libvirt-cve-1447.test
PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 304997 304998 ka 308361 308354 308372 308373 anyobj 51025 51023 51028 51029 51030 51024 51031 51032 anyobj 51060 51057 51065 51066 51067 51059 51068 51069 51070 51073 51074 51075 klass 50790 50788 50795 50796 50797 50798 50799 50800 50804 50805 50808 50809 50810 50811 51077 51078 51056 51080 51081 51034 51035 51036 51037 51038 51039 51040 51041 51042 51043 51044 51045 51048 51051 51052 m 69990 69989 69992 69993 69994 51053 308374 308375 308376 308377 308378 308379 308386 308387 308388 308389 308390 308402 308403 308404 308406 308407 308408 308410 308411 308412 308414 308415 308416 308417 308418 308422 308423 308424 308425 308432 308433 308434 308435 308436 308358 308437 308438 308439 308440 308441 308442 308443 308446 308447 308448 308449 308450 308451 308452 308453 308359 308456 308457 308458 308459 308460 308461 308462 308463 308464 308465 308466 308467 308468 308469 timeout opaque 22921 22917 22925 22919 22935 22937 308470 308471 308472 308473 308474 308475 308476 308477 308478 308480 308481 anyobj 50999 50996 51002 51003 51004 50997 51005 51006 51007 51010 51011 51012 51013 51014 50998 51015 51016 51018 51019 50995 51021 51022 308482 308485 308486 anyobj 51084 51082 51087 51088 51089 51083 51090 51091 51071 51093 51094 51095 51096 51097 51098 51099 51100 51101 51102 51103 51104 51107 51110 51111 m 69997 69996 69999 70000 70001 51112 308487 304999 305000 304989 305004 305005 \\]"
)
# test apache-25520
add_test(apache-25520.test "${PROJECT_BINARY_DIR}/TESTS/apache-25520/autotestConAnalysis.sh" "apache-25520" "${PROJECT_BINARY_DIR}/TESTS/apache-25520/race_report_read.txt")
set_tests_properties (apache-25520.test
PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 51089 51090 51091 51092 51093 50460 50461 50462 50463 50472 nbytes 108469 108470 108512 108515 108517 108518 108528 108529 108535 108543 108547 108548 108545 108549 108550 108552 108568 108569 108572 108573 108580 108581 108598 108604 108605 108608 108609 108616 108617 108626 108627 108628 108635 108636 108637 108638 108642 50473 50474 50475 51094 108511 108546 51132 51136 51137 51139 51142 51158 51164 51165 51166 51167 51170 51171 51078 \\]"
)
# test apache-21287
add_test(apache-21287.test "${PROJECT_BINARY_DIR}/TESTS/apache-21287/autotestConAnalysis.sh" "apache-21287" "${PROJECT_BINARY_DIR}/TESTS/apache-21287/race_report_read.txt")
set_tests_properties (apache-21287.test
PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 41365 mem 98913 98914 98915 98916 98917 98919 98920 mutex 96292 96293 96294 96295 96296 96297 tid1 96302 mem 98892 98893 98894 98895 98896 98898 98899 98904 98906 98907 98908 mutex 96381 96382 96383 96384 96385 96386 96391 96392 96393 96394 96396 96401 96402 96406 96407 96410 96411 98909 96303 96305 96306 96308 96309 96311 mem 98939 98940 98941 98942 98943 98945 98946 98951 98952 98954 98955 98956 98957 98960 98962 98963 98964 98966 98967 96312 96313 96314 96315 96316 96319 96320 96322 96323 96326 96327 98922 98923 98924 98925 98926 98927 98928 98932 98934 98935 41366 41367 41368 \\]"
)
# test mysql-24988
add_test(mysql-24988.test "${PROJECT_BINARY_DIR}/TESTS/mysql-24988/autotestConAnalysis.sh" "mysql-24988" "${PROJECT_BINARY_DIR}/TESTS/mysql-24988/race_report_read.txt")
set_tests_properties (mysql-24988.test
PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 150039 150040 150041 155892 155893 150829 150830 150833 150844 150845 150846 149415 \\]"
)
# test kernel-CVE-2004-1235
#add_test(kernel-cve-2004-1235.test "${PROJECT_BINARY_DIR}/TESTS/kernel-cve-2004-1235/autotest.sh" "kernel-cve-2004-1235")
#set_tests_properties (kernel-cve-2004-1235.test
# PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 3301 3302 3313 3314 3328 3329 3330 3331 3333 sem 2274 3335 3336 mapping 696 697 698 699 704 head 679 680 681 682 683 705 706 707 708 709 710 711 712 713 714 716 entry1 178 179 180 181 prev next 5597 5598 5599 5600 182 183 184 185 186 717 718 719 new head 190 191 next 5556 5557 5559 5558 192 720 722 723 addr 105 106 107 108 109 110 111 724 725 726 727 728 addr 114 729 730 731 733 v 685 686 page 770 771 addr 173 772 773 774 736 738 739 743 744 748 749 addr 691 750 page 266 267 270 271 addr 1134 272 273 274 761 3337 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3362 3363 3366 3368 3369 3370 mapping 783 788 789 790 791 792 793 795 797 798 801 802 806 807 812 page 859 860 864 865 873 874 815 817 818 822 823 3371 3373 3374 3375 3376 3379 3381 3382 sem 2278 3385 3387 3389 3390 3267 3269 3270 3289 3295 \\]"
# )
# test freebsd-cve-3527a
#add_test(freebsd-cve-3527a.test "${PROJECT_BINARY_DIR}/TESTS/freebsd-cve-3527a/autotest.sh" "freebsd-cve-3527a")
#set_tests_properties (freebsd-cve-3527a.test
#PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 13 14 15 16 17 \\]\n\\[ 1 2 3 4 5 6 7 8 9 10 13 \\]\n\\[ 13 \\]"
#)
# test freebsd-osvdb-58543
#add_test(freebsd-osvdb-58543.test "${PROJECT_BINARY_DIR}/TESTS/freebsd-osvdb-58543/autotest.sh" "freebsd-osvdb-58543")
#set_tests_properties (freebsd-osvdb-58543.test
#PROPERTIES PASS_REGULAR_EXPRESSION "\\[ 2 3 vp 8 9 11 \\]\n\\[ 7 8 9 10 11 \\]\n\\[ 8 9 11 \\]"
#)
#do_test(freebsd-cve-3527a "\n[ 13 14 15 16 17 ]\n[ 1 2 3 4 5 6 7 8 9 10 13 ]\n[ 13 ]")