forked from aws/s2n-tls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wrapper structs for X509/X509_CRL
- Loading branch information
Showing
16 changed files
with
4,329 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
tests/cbmc/proofs/s2n_add_overflow/report/json/viewer-coverage.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"viewer-coverage": { | ||
"coverage": { | ||
"tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c": { | ||
"s2n_add_overflow_harness": { | ||
"24": "hit", | ||
"25": "hit", | ||
"26": "hit", | ||
"28": "hit", | ||
"29": "hit", | ||
"31": "hit", | ||
"33": "hit" | ||
} | ||
}, | ||
"tests/cbmc/stubs/s2n_calculate_stacktrace.c": { | ||
"s2n_calculate_stacktrace": { | ||
"20": "hit" | ||
} | ||
}, | ||
"utils/s2n_safety.c": { | ||
"s2n_add_overflow": { | ||
"199": "both", | ||
"200": "hit", | ||
"201": "both", | ||
"202": "hit", | ||
"203": "hit", | ||
"204": "hit" | ||
} | ||
} | ||
}, | ||
"function_coverage": { | ||
"tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c": { | ||
"s2n_add_overflow_harness": { | ||
"hit": 7, | ||
"percentage": 1.0, | ||
"total": 7 | ||
} | ||
}, | ||
"tests/cbmc/stubs/s2n_calculate_stacktrace.c": { | ||
"s2n_calculate_stacktrace": { | ||
"hit": 1, | ||
"percentage": 1.0, | ||
"total": 1 | ||
} | ||
}, | ||
"utils/s2n_safety.c": { | ||
"s2n_add_overflow": { | ||
"hit": 6, | ||
"percentage": 1.0, | ||
"total": 6 | ||
} | ||
} | ||
}, | ||
"line_coverage": { | ||
"tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c": { | ||
"24": "hit", | ||
"25": "hit", | ||
"26": "hit", | ||
"28": "hit", | ||
"29": "hit", | ||
"31": "hit", | ||
"33": "hit" | ||
}, | ||
"tests/cbmc/stubs/s2n_calculate_stacktrace.c": { | ||
"20": "hit" | ||
}, | ||
"utils/s2n_safety.c": { | ||
"199": "both", | ||
"200": "hit", | ||
"201": "both", | ||
"202": "hit", | ||
"203": "hit", | ||
"204": "hit" | ||
} | ||
}, | ||
"overall_coverage": { | ||
"hit": 14, | ||
"percentage": 1.0, | ||
"total": 14 | ||
} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
tests/cbmc/proofs/s2n_add_overflow/report/json/viewer-loop.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"viewer-loop": { | ||
"loops": { | ||
"s2n_add_overflow.0": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 199 | ||
}, | ||
"s2n_add_overflow.1": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 199 | ||
}, | ||
"s2n_add_overflow.2": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 199 | ||
}, | ||
"s2n_add_overflow.3": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 201 | ||
}, | ||
"s2n_add_overflow.4": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 201 | ||
}, | ||
"s2n_add_overflow.5": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 201 | ||
} | ||
} | ||
} | ||
} |
206 changes: 206 additions & 0 deletions
206
tests/cbmc/proofs/s2n_add_overflow/report/json/viewer-property.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
{ | ||
"viewer-property": { | ||
"properties": { | ||
"malloc.assertion.1": { | ||
"class": "assertion", | ||
"description": "max allocation size exceeded", | ||
"expression": "malloc_size <= __CPROVER_max_malloc_size", | ||
"location": { | ||
"file": "<builtin-library-malloc>", | ||
"function": "malloc", | ||
"line": 28 | ||
} | ||
}, | ||
"malloc.assertion.2": { | ||
"class": "assertion", | ||
"description": "max allocation may fail", | ||
"expression": "!(1 != 0) || !should_malloc_fail", | ||
"location": { | ||
"file": "<builtin-library-malloc>", | ||
"function": "malloc", | ||
"line": 33 | ||
} | ||
}, | ||
"s2n_add_overflow.overflow.1": { | ||
"class": "overflow", | ||
"description": "arithmetic overflow on unsigned + in (uint64_t)a + (uint64_t)b", | ||
"expression": "!overflow(\"+\", uint64_t, (uint64_t)a, (uint64_t)b)", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 200 | ||
} | ||
}, | ||
"s2n_add_overflow.overflow.2": { | ||
"class": "overflow", | ||
"description": "arithmetic overflow on unsigned to unsigned type conversion in (uint32_t)result", | ||
"expression": "!(result >= 4294967296ull)", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow.pointer_dereference.1": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: pointer NULL in *out", | ||
"expression": "!(POINTER_OBJECT(out) == POINTER_OBJECT(((uint32_t *)NULL)))", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow.pointer_dereference.2": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: pointer invalid in *out", | ||
"expression": "!IS_INVALID_POINTER(out)", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow.pointer_dereference.3": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: deallocated dynamic object in *out", | ||
"expression": "!(POINTER_OBJECT(out) == POINTER_OBJECT(__CPROVER_deallocated))", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow.pointer_dereference.4": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: dead object in *out", | ||
"expression": "!(POINTER_OBJECT(out) == POINTER_OBJECT(__CPROVER_dead_object))", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow.pointer_dereference.5": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: pointer outside object bounds in *out", | ||
"expression": "POINTER_OFFSET(out) >= 0l && OBJECT_SIZE(out) >= (unsigned long int)POINTER_OFFSET(out) + 4ul", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow.pointer_dereference.6": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: invalid integer address in *out", | ||
"expression": "!(POINTER_OBJECT(((uint32_t *)NULL)) == POINTER_OBJECT(out)) || out == ((uint32_t *)NULL)", | ||
"location": { | ||
"file": "utils/s2n_safety.c", | ||
"function": "s2n_add_overflow", | ||
"line": 202 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.assertion.1": { | ||
"class": "assertion", | ||
"description": "assertion *out == a + b", | ||
"expression": "!((signed long int)(signed long int)!(*out == a + b) != 0l)", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.assertion.2": { | ||
"class": "assertion", | ||
"description": "assertion ( uint64_t )a + ( uint64_t )b > UINT32_MAX || out == NULL", | ||
"expression": "!((signed long int)(signed long int)!((uint64_t)a + (uint64_t)b > (unsigned long int)4294967295u || out == ((uint32_t *)NULL)) != 0l)", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 31 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.overflow.1": { | ||
"class": "overflow", | ||
"description": "arithmetic overflow on unsigned + in a + b", | ||
"expression": "!overflow(\"+\", uint32_t, a, b)", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.overflow.2": { | ||
"class": "overflow", | ||
"description": "arithmetic overflow on unsigned + in (uint64_t)a + (uint64_t)b", | ||
"expression": "TRUE ==> !overflow(\"+\", uint64_t, (uint64_t)a, (uint64_t)b)", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 31 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.pointer_dereference.1": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: pointer NULL in *out", | ||
"expression": "!(POINTER_OBJECT(out) == POINTER_OBJECT(((uint32_t *)NULL)))", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.pointer_dereference.2": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: pointer invalid in *out", | ||
"expression": "!IS_INVALID_POINTER(out)", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.pointer_dereference.3": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: deallocated dynamic object in *out", | ||
"expression": "!(POINTER_OBJECT(out) == POINTER_OBJECT(__CPROVER_deallocated))", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.pointer_dereference.4": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: dead object in *out", | ||
"expression": "!(POINTER_OBJECT(out) == POINTER_OBJECT(__CPROVER_dead_object))", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.pointer_dereference.5": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: pointer outside object bounds in *out", | ||
"expression": "POINTER_OFFSET(out) >= 0l && OBJECT_SIZE(out) >= (unsigned long int)POINTER_OFFSET(out) + 4ul", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
}, | ||
"s2n_add_overflow_harness.pointer_dereference.6": { | ||
"class": "pointer dereference", | ||
"description": "dereference failure: invalid integer address in *out", | ||
"expression": "!(POINTER_OBJECT(((uint32_t *)NULL)) == POINTER_OBJECT(out)) || out == ((uint32_t *)NULL)", | ||
"location": { | ||
"file": "tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c", | ||
"function": "s2n_add_overflow_harness", | ||
"line": 29 | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/cbmc/proofs/s2n_add_overflow/report/json/viewer-reachable.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"viewer-reachable": { | ||
"reachable": { | ||
"tests/cbmc/proofs/s2n_add_overflow/s2n_add_overflow_harness.c": [ | ||
"s2n_add_overflow_harness" | ||
], | ||
"tests/cbmc/stubs/s2n_calculate_stacktrace.c": [ | ||
"s2n_calculate_stacktrace" | ||
], | ||
"utils/s2n_safety.c": [ | ||
"s2n_add_overflow" | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.