Closed
Bug 221694
Opened 23 years ago
Closed 22 years ago
ber_get_next_buffer_ext() fails when length or tag is split across buffers
Categories
(Directory Graveyard :: LDAP C SDK, defect, P1)
Directory Graveyard
LDAP C SDK
Tracking
(Not tracked)
RESOLVED
FIXED
5.13
People
(Reporter: mcs, Assigned: mcs)
Details
Attachments
(3 files, 3 obsolete files)
|
8.41 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.08 KB,
patch
|
Details | Diff | Splinter Review | |
|
10.33 KB,
patch
|
Details | Diff | Splinter Review |
ber_get_next_buffer_ext() is not restartable in the sense that in some cases it
will not pick up correctly where it left off when it is called more than once to
read the same LDAP message. In particular, there are problems if the length is
more than one byte long and the bytes that make up the length are split across
two buffers that are passed to ber_get_next_buffer_ext() in two different calls.
A similar problem exists for multi-byte tags (although those are rare) and
ber_get_next() also may have similar bugs.
| Assignee | ||
Updated•23 years ago
|
Priority: -- → P1
Target Milestone: --- → 5.13
| Assignee | ||
Comment 1•22 years ago
|
||
Noriko is working on this bug.
Assignee: MarkCSmithWork → norikoyasuo
| Assignee | ||
Comment 2•22 years ago
|
||
To cover the ber_get_next() issues I filed bug 222106 - "ber_get_next() fails
when length or tag is split across buffers"
Comment 3•22 years ago
|
||
If the length is more than one byte long and the bytes that make up the length
are split across the buffer boundary, the byte(s) read in the first
read/receive is stored in ber_buf and combined with the rest read in the second
read/receive, which could be repeated until the complete length info is
received.
| Assignee | ||
Comment 4•22 years ago
|
||
Comment on attachment 133294 [details] [diff] [review]
proposal for fixing ber_get_next_buffer_ent
The fix looks good. I will commit this soon.
Attachment #133294 -
Flags: review+
| Assignee | ||
Comment 5•22 years ago
|
||
It is worth noting that the fix does not address potential problems with
multibyte tags. But I am pretty sure that all LDAP tags are one byte long.
Status: NEW → ASSIGNED
| Assignee | ||
Comment 6•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #133294 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•22 years ago
|
||
Fix committed to the trunk:
mozilla/directory/c-sdk/ldap/libraries/liblber/io.c
new revision: 5.4; previous revision: 5.3
Fix bug # 221694 - ber_get_next_buffer_ext() fails when length or tag
is split across buffers.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 8•22 years ago
|
||
Reopened because we saw some problems that we can't explain.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 9•22 years ago
|
||
| Assignee | ||
Comment 10•22 years ago
|
||
Additional fixes committed to the trunk; reviewed by Noriko:
mozilla/directory/c-sdk/ldap/libraries/liblber/io.c
new revision: 5.6; previous revision: 5.5
Additional "bulletproofing" for bug # 221694 - ber_get_next_buffer_ext()
fails when length or tag is split across buffers.
Assignee: norikoyasuo → MarkCSmithWork
Status: REOPENED → NEW
| Assignee | ||
Comment 11•22 years ago
|
||
Marking fixed.
Status: NEW → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 12•22 years ago
|
||
Reopening bug. Need to more precisely indicate errors. Also, the recent changes
broke some applications that checked *Bytes_Scanned == 0 to determine if a fatal
error occurred; we need to be backward compatible.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 13•22 years ago
|
||
| Assignee | ||
Comment 14•22 years ago
|
||
| Assignee | ||
Comment 15•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #133886 -
Attachment is obsolete: true
Attachment #133949 -
Attachment is obsolete: true
| Assignee | ||
Comment 16•22 years ago
|
||
Additional fix committed to the trunk; reviewed by Noriko and EY:
mozilla/directory/c-sdk/ldap/libraries/liblber/io.c
new revision: 5.7; previous revision: 5.6
Additional fix for 221694 - ber_get_next_buffer_ext() fails when
length or tag is split across buffers.
Improve backwards compatibility by setting *Bytes_Scanned to zero
when errors occur; use errno to report specific errors.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•