-
Notifications
You must be signed in to change notification settings - Fork 325
Commit 129d303
Fix DOS attack from malicious pongs
A double channel close panic was possible if a peer sent back multiple
pongs for every ping.
If the second pong arrived before the ping goroutine deleted its channel
from the map, the channel would be closed twice and so a panic would
ensue.
This fixes that by having the read goroutine send on the ping
goroutine's channel rather than closing it.
Reported via email by Tibor Kálmán @kalmant
Please update to the new release ASAP!1 parent e4c3b0f commit 129d303
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