[pypy-issue] Issue #2616: Incomplete error handling in `_SSLSocket.read` (pypy/pypy)

Ben Darnell issues-reply at bitbucket.org
Sun Jul 23 19:30:14 EDT 2017


New issue 2616: Incomplete error handling in `_SSLSocket.read`
https://bitbucket.org/pypy/pypy/issues/2616/incomplete-error-handling-in

Ben Darnell:

The error handling block in [`_SSLSocket.read`](https://github.com/pypy/pypy-std-ssl/blob/415df87c6b8ea0300166726d455507cb888492a6/_stdssl/__init__.py#L473-L482) appears to be incomplete: if `SSL_read` returns `SSL_ERR_SYSCALL` (or potentially others; I don't know what is possible here but `SSL_ERR_SYSCALL` definitely is), it assumes success and returns a successful zero-byte read. 

I discovered this while running Tornado's test suite on pypy3 (version 5.8). The test in question is kind of ugly in the way it triggers the syscall error, but I believe this is a real issue in pypy's ssl module. 

Possibly related to #2578




More information about the pypy-issue mailing list