You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2006/09/21 08:13:22 UTC

[jira] Created: (DIRSERVER-745) Decoding of lengths can fail if the PDU is splitted

Decoding of lengths can fail if the PDU is splitted 
----------------------------------------------------

                 Key: DIRSERVER-745
                 URL: http://issues.apache.org/jira/browse/DIRSERVER-745
             Project: Directory ApacheDS
          Issue Type: Bug
            Reporter: Emmanuel Lecharny
         Assigned To: Emmanuel Lecharny


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. 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DIRSERVER-745) Decoding of lengths can fail if the PDU is splitted

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DIRSERVER-745?page=comments#action_12436439 ] 
            
Emmanuel Lecharny commented on DIRSERVER-745:
---------------------------------------------

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* 

> Decoding of lengths can fail if the PDU is splitted
> ---------------------------------------------------
>
>                 Key: DIRSERVER-745
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-745
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Emmanuel Lecharny
>         Assigned To: Emmanuel Lecharny
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DIRSERVER-745) Decoding of lengths can fail if the PDU is splitted

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-745?page=all ]

Emmanuel Lecharny resolved DIRSERVER-745.
-----------------------------------------

    Resolution: Fixed

It has been fixed two weeks ago. It was a bug in the way lengths were handled

> Decoding of lengths can fail if the PDU is splitted
> ---------------------------------------------------
>
>                 Key: DIRSERVER-745
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-745
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Emmanuel Lecharny
>         Assigned To: Emmanuel Lecharny
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DIRSERVER-745) Decoding of lengths can fail if the PDU is splitted

Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DIRSERVER-745?page=all ]

Emmanuel Lecharny closed DIRSERVER-745.
---------------------------------------


fixed

> Decoding of lengths can fail if the PDU is splitted
> ---------------------------------------------------
>
>                 Key: DIRSERVER-745
>                 URL: http://issues.apache.org/jira/browse/DIRSERVER-745
>             Project: Directory ApacheDS
>          Issue Type: Bug
>            Reporter: Emmanuel Lecharny
>         Assigned To: Emmanuel Lecharny
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira