Commit 7a64238
Fix nbd-server infinite loop for TLS
When the nbd-client disconnects from a TLS connection, the gnutls_record_recv
function will return a zero value. Due to a faulty/missing check, this
causes the readit_tls call to enter an infinite loop, with all terrible
consequences that this has. This is a very problematic bug that causes a
full CPU usage, and is only treatable by killing the nbd-server.
This fix adds the missing check and an appropriate message that
terminates the forked server child graceously.
Signed-off-by: Janis Kalofolias <code@kalofolias.de>1 parent 17043b0 commit 7a64238
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
| |||
0 commit comments