|
1 | 1 | { |
2 | | - "task_id": "sec-cve-003", |
3 | | - "cve_id": "CVE-2023-39325", |
4 | | - "vulnerability_type": "uncontrolled_resource_consumption", |
5 | | - "severity": "high", |
6 | | - "cvss_score": 7.5, |
7 | | - |
| 2 | + "weights": { |
| 3 | + "required_findings": 0.40, |
| 4 | + "file_references": 0.20, |
| 5 | + "causal_chain": 0.20, |
| 6 | + "negative_checks": 0.10 |
| 7 | + }, |
8 | 8 | "required_findings": [ |
9 | 9 | { |
10 | | - "type": "vulnerable_function", |
11 | | - "value": "processHeaders", |
12 | | - "file": "http2/server.go", |
13 | | - "weight": 0.20, |
14 | | - "description": "The processHeaders function directly spawns handler goroutines without checking limits" |
| 10 | + "patterns": ["(?i)processHeaders"], |
| 11 | + "description": "The processHeaders function directly spawns handler goroutines without checking limits", |
| 12 | + "weight": 2.0 |
15 | 13 | }, |
16 | 14 | { |
17 | | - "type": "vulnerable_pattern", |
18 | | - "value": "go sc.runHandler", |
19 | | - "context": "unbounded goroutine creation", |
20 | | - "weight": 0.15, |
21 | | - "description": "Direct goroutine spawning without tracking or limiting active handlers" |
| 15 | + "patterns": ["(?i)go\\s+sc\\.runHandler", "(?i)runHandler"], |
| 16 | + "description": "Direct goroutine spawning without tracking or limiting active handlers", |
| 17 | + "weight": 1.5 |
22 | 18 | }, |
23 | 19 | { |
24 | | - "type": "missing_check", |
25 | | - "value": "handler_goroutine_limit", |
26 | | - "context": "no enforcement of MaxConcurrentStreams on handler goroutines", |
27 | | - "weight": 0.15, |
28 | | - "description": "The vulnerability exists because handler goroutines are not counted or limited" |
| 20 | + "patterns": ["(?i)(handler.*goroutine.*limit|MaxConcurrentStreams.*handler|limit.*handler)"], |
| 21 | + "description": "The vulnerability exists because handler goroutines are not counted or limited", |
| 22 | + "weight": 1.5 |
29 | 23 | }, |
30 | 24 | { |
31 | | - "type": "vulnerability_type", |
32 | | - "value": "denial_of_service", |
33 | | - "context": "resource exhaustion via rapid stream reset", |
34 | | - "weight": 0.10, |
35 | | - "description": "HTTP/2 rapid reset attack causing unbounded goroutine accumulation" |
| 25 | + "patterns": ["(?i)(denial.of.service|DoS|resource.exhaustion)"], |
| 26 | + "description": "HTTP/2 rapid reset attack causing unbounded goroutine accumulation", |
| 27 | + "weight": 1.0 |
36 | 28 | }, |
37 | 29 | { |
38 | | - "type": "attack_vector", |
39 | | - "value": "rst_stream", |
40 | | - "context": "RST_STREAM frees stream slots while handlers keep running", |
41 | | - "weight": 0.10, |
42 | | - "description": "Attacker rapidly creates streams and resets them to spawn unbounded handlers" |
| 30 | + "patterns": ["(?i)(RST_STREAM|rapid.reset|rst.stream)"], |
| 31 | + "description": "Attacker rapidly creates streams and resets them to spawn unbounded handlers", |
| 32 | + "weight": 1.0 |
43 | 33 | }, |
44 | 34 | { |
45 | | - "type": "affected_component", |
46 | | - "value": "http2_server", |
47 | | - "context": "golang.org/x/net/http2 package", |
48 | | - "weight": 0.10, |
49 | | - "description": "The http2 server implementation in x/net" |
| 35 | + "patterns": ["(?i)(http2.*server|x/net/http2|golang.org/x/net)"], |
| 36 | + "description": "The http2 server implementation in x/net", |
| 37 | + "weight": 1.0 |
50 | 38 | } |
51 | 39 | ], |
52 | | - |
53 | 40 | "file_references": [ |
54 | 41 | { |
55 | | - "path": "http2/server.go", |
56 | | - "relevance": "primary", |
57 | | - "weight": 0.10, |
58 | | - "description": "Contains the vulnerable processHeaders and runHandler functions" |
| 42 | + "patterns": ["http2/server\\.go"], |
| 43 | + "description": "Contains the vulnerable processHeaders and runHandler functions", |
| 44 | + "weight": 2.0 |
59 | 45 | }, |
60 | 46 | { |
61 | | - "path": "http2/frame.go", |
62 | | - "relevance": "supporting", |
63 | | - "weight": 0.05, |
64 | | - "description": "Defines RST_STREAM frame handling used in the attack" |
| 47 | + "patterns": ["http2/frame\\.go"], |
| 48 | + "description": "Defines RST_STREAM frame handling used in the attack", |
| 49 | + "weight": 1.0 |
65 | 50 | }, |
66 | 51 | { |
67 | | - "path": "http2/transport.go", |
68 | | - "relevance": "supporting", |
69 | | - "weight": 0.05, |
70 | | - "description": "HTTP/2 stream management, relevant for understanding stream lifecycle" |
| 52 | + "patterns": ["http2/transport\\.go"], |
| 53 | + "description": "HTTP/2 stream management, relevant for understanding stream lifecycle", |
| 54 | + "weight": 1.0 |
71 | 55 | } |
72 | 56 | ], |
73 | | - |
74 | 57 | "causal_chain": [ |
75 | 58 | { |
76 | | - "step": 1, |
77 | | - "function": "serve", |
78 | | - "file": "http2/server.go", |
79 | | - "description": "Main server loop processes incoming HTTP/2 frames" |
| 59 | + "patterns": ["(?i)(serve|server.*loop|incoming.*frame)"], |
| 60 | + "description": "Step 1: Main server loop processes incoming HTTP/2 frames", |
| 61 | + "weight": 1.0 |
80 | 62 | }, |
81 | 63 | { |
82 | | - "step": 2, |
83 | | - "function": "processHeaders", |
84 | | - "file": "http2/server.go", |
85 | | - "description": "Processes HEADERS frame and spawns handler goroutine" |
| 64 | + "patterns": ["(?i)(processHeaders|HEADERS.*frame)"], |
| 65 | + "description": "Step 2: Processes HEADERS frame and spawns handler goroutine", |
| 66 | + "weight": 1.0 |
86 | 67 | }, |
87 | 68 | { |
88 | | - "step": 3, |
89 | | - "code": "go sc.runHandler(rw, req, handler)", |
90 | | - "file": "http2/server.go", |
91 | | - "description": "VULNERABLE: Spawns handler goroutine without checking limit" |
| 69 | + "patterns": ["(?i)(runHandler|spawn.*goroutine|go\\s+sc)"], |
| 70 | + "description": "Step 3: Spawns handler goroutine without checking limit (VULNERABLE)", |
| 71 | + "weight": 1.0 |
92 | 72 | }, |
93 | 73 | { |
94 | | - "step": 4, |
95 | | - "event": "RST_STREAM received", |
96 | | - "description": "Attacker sends RST_STREAM to free stream slot" |
| 74 | + "patterns": ["(?i)(RST_STREAM|reset.*stream|stream.*reset)"], |
| 75 | + "description": "Step 4: Attacker sends RST_STREAM to free stream slot", |
| 76 | + "weight": 1.0 |
97 | 77 | }, |
98 | 78 | { |
99 | | - "step": 5, |
100 | | - "event": "stream slot freed", |
101 | | - "description": "Stream slot becomes available, but handler goroutine continues running" |
| 79 | + "patterns": ["(?i)(stream.*slot.*free|handler.*continue|goroutine.*accumul)"], |
| 80 | + "description": "Step 5: Stream slot freed but handler goroutine continues running", |
| 81 | + "weight": 1.0 |
102 | 82 | }, |
103 | 83 | { |
104 | | - "step": 6, |
105 | | - "event": "rapid repetition", |
106 | | - "description": "Attacker repeats steps 2-5 rapidly to accumulate handler goroutines" |
107 | | - }, |
108 | | - { |
109 | | - "step": 7, |
110 | | - "impact": "resource exhaustion", |
111 | | - "description": "Unbounded handler goroutines consume CPU and memory, causing DoS" |
| 84 | + "patterns": ["(?i)(rapid.*repeat|unbounded|exhaust|CPU|memory|DoS)"], |
| 85 | + "description": "Step 6-7: Rapid repetition causes unbounded goroutine accumulation and resource exhaustion", |
| 86 | + "weight": 1.0 |
112 | 87 | } |
113 | 88 | ], |
114 | | - |
115 | 89 | "negative_checks": [ |
116 | 90 | { |
117 | | - "type": "wrong_component", |
118 | | - "value": "TLS layer", |
119 | | - "weight": 0.05, |
120 | | - "description": "The vulnerability is NOT in TLS, it's in HTTP/2 stream handling" |
| 91 | + "patterns": ["(?i)\\bTLS\\b.*\\b(layer|vulnerab|bug|flaw)"], |
| 92 | + "description": "The vulnerability is NOT in TLS, it's in HTTP/2 stream handling", |
| 93 | + "weight": 1.0 |
121 | 94 | }, |
122 | 95 | { |
123 | | - "type": "wrong_component", |
124 | | - "value": "HTTP/1.1", |
125 | | - "weight": 0.05, |
126 | | - "description": "The vulnerability is specific to HTTP/2, not HTTP/1.1" |
| 96 | + "patterns": ["(?i)\\bHTTP/1\\.1\\b.*\\b(vulnerab|affect|bug|flaw)"], |
| 97 | + "description": "The vulnerability is specific to HTTP/2, not HTTP/1.1", |
| 98 | + "weight": 1.0 |
127 | 99 | }, |
128 | 100 | { |
129 | | - "type": "wrong_vulnerability_type", |
130 | | - "value": "buffer overflow", |
131 | | - "weight": 0.05, |
132 | | - "description": "This is NOT a memory corruption bug, it's resource exhaustion" |
| 101 | + "patterns": ["(?i)\\bbuffer\\s+overflow\\b"], |
| 102 | + "description": "This is NOT a memory corruption bug, it's resource exhaustion", |
| 103 | + "weight": 1.0 |
133 | 104 | }, |
134 | 105 | { |
135 | | - "type": "wrong_attack_vector", |
136 | | - "value": "malformed headers", |
137 | | - "weight": 0.05, |
138 | | - "description": "Attack uses valid HTTP/2 frames (RST_STREAM), not malformed input" |
| 106 | + "patterns": ["(?i)\\bmalformed\\s+headers?\\b.*\\b(attack|exploit|vuln)"], |
| 107 | + "description": "Attack uses valid HTTP/2 frames (RST_STREAM), not malformed input", |
| 108 | + "weight": 1.0 |
139 | 109 | }, |
140 | 110 | { |
141 | | - "type": "wrong_fix", |
142 | | - "value": "input validation", |
143 | | - "weight": 0.05, |
144 | | - "description": "Fix is not about validating input, but limiting concurrent handler goroutines" |
| 111 | + "patterns": ["(?i)\\binput\\s+validation\\b.*\\bfix\\b"], |
| 112 | + "description": "Fix is not about validating input, but limiting concurrent handler goroutines", |
| 113 | + "weight": 1.0 |
145 | 114 | } |
146 | 115 | ], |
147 | | - |
148 | | - "remediation_keywords": [ |
149 | | - "limit handler goroutines", |
150 | | - "enforce MaxConcurrentStreams on handlers", |
151 | | - "queue deferred handlers", |
152 | | - "track active handler count", |
153 | | - "backpressure mechanism", |
154 | | - "scheduleHandler function", |
155 | | - "curHandlers counter", |
156 | | - "unstartedHandlers queue" |
157 | | - ], |
158 | | - |
159 | 116 | "metadata": { |
| 117 | + "task_id": "sec-cve-003", |
| 118 | + "cve_id": "CVE-2023-39325", |
| 119 | + "vulnerability_type": "uncontrolled_resource_consumption", |
| 120 | + "severity": "high", |
| 121 | + "cvss_score": 7.5, |
160 | 122 | "fix_commit": "b225e7ca6dde1ef5a5ae5ce922861bda011cfabd", |
161 | 123 | "vulnerable_commit": "88194ad8ab44a02ea952c169883c3f57db6cf9f4", |
162 | 124 | "fix_version": "v0.17.0", |
163 | 125 | "vulnerable_version": "v0.16.0", |
164 | | - "disclosure_date": "2023-10-10", |
165 | 126 | "also_known_as": "CVE-2023-44487", |
166 | 127 | "attack_name": "HTTP/2 Rapid Reset" |
167 | 128 | } |
|
0 commit comments