Issue Details (XML | Word | Printable)

Key: DIRSERVER-745
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Emmanuel Lecharny
Reporter: Emmanuel Lecharny
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Directory ApacheDS

Decoding of lengths can fail if the PDU is splitted

Created: 21/Sep/06 06:12 AM   Updated: 02/Oct/06 12:14 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Resolution Date: 02/Oct/06 12:14 PM


 Description  « Hide
While reading the ASN.1 decoder code, I found a pretty nasty case where the decoding can fail during length decoding :
if the length is more than 2 bytes long, and if the PDU is splitted just after the second byte, then we can have a BufferUnderFlowException.

This can occur because we are reading the buffe without controlling that we still have some remaining bytes.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Lecharny added a comment - 21/Sep/06 06:13 AM
This issue is not really likely to occurs :
- we must have a PDU which is more than 256 bytes long
- and the length part should be splitted

However, this is still a serious bug (and easy to fix :). Code reviews are *good*

Emmanuel Lecharny added a comment - 02/Oct/06 12:14 PM
It has been fixed two weeks ago. It was a bug in the way lengths were handled

Emmanuel Lecharny added a comment - 02/Oct/06 12:14 PM
fixed