- Notifications
You must be signed in to change notification settings - Fork329
Commit129d303
committed
Fix DOS attack from malicious pongs
A double channel close panic was possible if a peer sent back multiplepongs for every ping.If the second pong arrived before the ping goroutine deleted its channelfrom the map, the channel would be closed twice and so a panic wouldensue.This fixes that by having the read goroutine send on the pinggoroutine's channel rather than closing it.Reported via email by Tibor Kálmán@kalmantPlease update to the new release ASAP!1 parente4c3b0f commit129d303
2 files changed
+5
-2
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
192 |
| - | |
| 192 | + | |
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
274 |
| - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
275 | 278 |
| |
276 | 279 |
| |
277 | 280 |
| |
|
0 commit comments
Comments
(0)