-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathFreed.json
More file actions
197 lines (197 loc) · 6.9 KB
/
Freed.json
File metadata and controls
197 lines (197 loc) · 6.9 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
{
"AUTOSAR": {
"A18-5-3": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "automated",
"obligation": "required"
},
"queries": [
{
"description": "An object that was allocated with 'new' is being freed using 'delete[]'. Behavior in such cases is undefined and should be avoided. Use 'delete' instead.",
"kind": "problem",
"name": "'new' object freed with 'delete[]'",
"precision": "high",
"severity": "warning",
"short_name": "NewDeleteArrayMismatch",
"tags": [
"correctness"
]
},
{
"description": "An array allocated with 'new[]' is being freed using 'delete'. Behavior in such cases is undefined and should be avoided. Use 'delete[]' when freeing arrays allocated with 'new[]'.",
"kind": "problem",
"name": "'new[]' array freed with 'delete'",
"precision": "high",
"severity": "warning",
"short_name": "NewArrayDeleteMismatch",
"tags": [
"correctness"
]
}
],
"title": "The form of the delete expression shall match the form of the new expression used to allocate the memory."
},
"A3-8-1": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "non-automated",
"obligation": "required"
},
"queries": [
{
"description": "Accessing an object before its lifetime can result in undefined behavior.",
"kind": "problem",
"name": "Access of uninitialized object",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "ObjectAccessedBeforeLifetime",
"short_name": "ObjectAccessedBeforeLifetimeAutosar",
"tags": [
"correctness",
"security"
]
},
{
"description": "Accessing an object after its lifetime results in undefined behavior.",
"kind": "problem",
"name": "Access of object after lifetime (use-after-free)",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "ObjectAccessedAfterLifetime",
"short_name": "ObjectAccessedAfterLifetimeAutosar",
"tags": [
"correctness",
"security"
]
}
],
"title": "An object shall not be accessed outside of its lifetime."
},
"M7-5-2": {
"properties": {
"allocated-target": [
"implementation"
],
"enforcement": "non-automated",
"obligation": "required"
},
"queries": [
{
"description": "The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.",
"kind": "problem",
"name": "Do not assign the address of an object with automatic storage to an object that may persist after it's lifetime",
"precision": "very-high",
"severity": "warning",
"short_name": "AssignmentOfEscapingAutoStorage",
"shared_implementation_short_name": "DoNotCopyAddressOfAutoStorageObjectToOtherObject",
"tags": [
"correctness"
]
}
],
"title": "The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist."
}
},
"CERT-C++": {
"EXP51-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "Deleting an array through a pointer of an incorrect type leads to undefined behavior.",
"kind": "path-problem",
"name": "Do not delete an array through a pointer of the incorrect type",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "DoNotDeleteAnArrayThroughAPointerOfTheIncorrectTypeShared",
"short_name": "DoNotDeleteAnArrayThroughAPointerOfTheIncorrectType",
"tags": [
"correctness",
"external/cert/severity/low",
"external/cert/likelihood/unlikely",
"external/cert/remediation-cost/medium",
"external/cert/priority/p2",
"external/cert/level/l3"
]
}
],
"title": "Do not delete an array through a pointer of the incorrect type"
},
"EXP54-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "Accessing an object before its lifetime can result in undefined behavior.",
"kind": "problem",
"name": "Access of uninitialized object",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "ObjectAccessedBeforeLifetime",
"short_name": "ObjectAccessedBeforeLifetimeCert",
"tags": [
"correctness",
"security",
"external/cert/severity/high",
"external/cert/likelihood/probable",
"external/cert/remediation-cost/high",
"external/cert/priority/p6",
"external/cert/level/l2"
]
},
{
"description": "Accessing an object after its lifetime results in undefined behavior.",
"kind": "problem",
"name": "Access of object after lifetime (use-after-free)",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "ObjectAccessedAfterLifetime",
"short_name": "ObjectAccessedAfterLifetimeCert",
"tags": [
"correctness",
"security",
"external/cert/severity/high",
"external/cert/likelihood/probable",
"external/cert/remediation-cost/high",
"external/cert/priority/p6",
"external/cert/level/l2"
]
}
],
"title": "Do not access an object outside of its lifetime"
},
"MEM50-CPP": {
"properties": {
"obligation": "rule"
},
"queries": [
{
"description": "Accessing an object after it has been deallocated is undefined behavior.",
"kind": "problem",
"name": "Do not access freed memory",
"precision": "high",
"severity": "error",
"shared_implementation_short_name": "ObjectAccessedAfterLifetime",
"short_name": "UseAfterFree",
"tags": [
"correctness",
"security",
"external/cert/severity/high",
"external/cert/likelihood/likely",
"external/cert/remediation-cost/medium",
"external/cert/priority/p18",
"external/cert/level/l1"
]
}
],
"title": "Do not access freed memory"
}
}
}