Mikhail Titov created DIRSERVER-2426:
----------------------------------------
Summary: Exceptions found in protocol decoders
Key: DIRSERVER-2426
URL: https://issues.apache.org/jira/browse/DIRSERVER-2426
Project: Directory ApacheDS
Issue Type: Bug
Components: dhcp, dns, ntp
Affects Versions: 2.0.0.AM27
Environment: OS: ubuntu:22.04
openjdk 21.0.10 2026-01-20
Reporter: Mikhail Titov
Attachments: repros.tar
Greetings! Recently I've been fuzzing some codecs (for DhcpMessage, NtpMessage
and DnsMessage) and found several crashes I'd like to report.
I have created a standalone repro for each target (`repros.tar` is attached).
You can reproduce them by going to the appropriate folder and running:
{code:bash}
java -cp .:jars/* <Filename>.java
{code}
A brief description of the found crashes for each target is provided below.
h4. repro_NtpMessage (NtpMessageDecoder - decode)
- BufferUnderflowException (14)
h4. repro_DhcpMessage (DhcpMessageDecoder - decode)
- NegativeArraySizeException (1)
- ArrayIndexOutOfBoundsException (1)
- BufferUnderflowException (19)
h4. repro_DnsMessage
I sorted different types of Exceptions to a several folders. To reproduce you
might want to change the _dirName_ in _DnsMessageRepro.java_ to an appropriate
folder name.
There are also a lot of crashes of types _BufferUnderflowException _(6579),
_IllegalArgumentException_ (1792) and _IndexOutOfBoundsException_ (1613). I
don't think it's worth considering each of them carefully, but they may be
useful for checking the fix.
The following exceptions were also found:
- StackOverflowError (4) in DnsMessageDecoder - decode
- NegativeArraySizeException (6) in DnsMessageDecoder - decode
- ClassCastException (6) in DnsMessageEncoder - encode
What do you think about handling some of these exceptions in the calling
function, adding information about them to the documentation or adding "throws"
keyword to a method declaration?
Best regards,
Mikhail
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]