[Date Prev][Date Next]
Re: (ITS#8650) EAGAIN from gnutls_handshake not respected
On 08/03/2018 12:09 PM, Ryan Tandy wrote:
> Thanks for letting me know about this. This patch is running on quite
> a few systems by now, I'm sorry the problem wasn't caught sooner. :/
No worries, thanks for responding so quickly on this!
>> I'm wondering if there is a better way to handle EAGAIN returned from
>> gnutls_handshake(), instead of doing a busywait as in ITS#8650, or my
>> simplistic attempt at inserting a sleep() call which doesn't really
>> seem to help. I'm wondering how the GnuTLS developers intend for
>> people to use gnutls_handshake() properly, so as to gracefully handle
>> sessions that involve long packets on the one hand, without opening
>> up a vulnerability to chew up lots of system resources on the other
> Right. I mean, this is how GnuTLS' own example shows to do it:
Hmm, that's a head-scratcher. It doesn't seem very effective to have a
non-blocking I/O interface and then recommend wrapping it in a busywait
> We could place a limit on the number of iterations, though any such
> limit would have to be arbitrary.
> There might be an asynchronous GnuTLS API that could be used to avoid
> tying up slapd while this is going on.
> I will look at how some other GnuTLS servers deal with this...
Cool, thanks Ryan.
Â Â Â -Kartik