Closed Bug 338325 Opened 19 years ago Closed 19 years ago

Fix for 80092 uncovered latent SSL writev non-blocking socket bug

Categories

(NSS :: Libraries, defect, P1)

3.11.1

Tracking

(Not tracked)

RESOLVED FIXED
3.11.2

People

(Reporter: chris.newman, Assigned: nelson)

Details

Attachments

(1 file)

The fix for 80092 uncovered a latent bug in the SSL writev code. Specifically, when ssl_WriteV gets a partial write on a non-blocking socket (which couldn't happen until 80092 was fixed), it returns an incorrect value for the partial write. Here's a proposed patch to fix this: *** sslsock.c 23 Apr 2006 03:05:42 -0000 1.44.2.3 --- sslsock.c 17 May 2006 17:16:42 -0000 *************** *** 1677,1683 **** } \ /* Only a nonblocking socket can have partial sends */ \ PR_ASSERT(!blocking); \ ! return sent; \ } #define SEND(bfr, len) \ do { \ --- 1677,1683 ---- } \ /* Only a nonblocking socket can have partial sends */ \ PR_ASSERT(!blocking); \ ! return sent + rv; \ } #define SEND(bfr, len) \ do { \
OS: Mac OS X 10.3 → All
Chris, You are SO RIGHT! Thanks for this bug report!
Assignee: nobody → nelson
Priority: -- → P1
Target Milestone: --- → 3.11.2
Of course, this can only be a problem on a non-blocking socket, since ssl_send won't return short writes on blocking sockets.
r=nelson
Attachment #222416 - Flags: review+
checked in on trunk (for NSS 3.12) and NSS_3_11_BRANCH (For 3.11.2) Checking in sslsock.c; new revision: 1.44.2.4; previous revision: 1.44.2.3 Checking in sslsock.c; new revision: 1.48; previous revision: 1.47
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: