[Oisf-devel] libhtp 0.5.5 test suite fails on some architectures

Brian Rectanus brectanu at gmail.com
Tue Oct 8 13:21:02 UTC 2013


On Tuesday, October 8, 2013, Ivan Ristić wrote:

> On 08/10/2013 12:55, Pierre Chifflier wrote:
> > On Mon, Oct 07, 2013 at 06:39:32PM +0100, Ivan Ristić wrote:
> >> On 07/10/2013 17:24, Victor Julien wrote:
> >>> On 10/07/2013 05:35 PM, Pierre Chifflier wrote:
> >>>> I am slowly catching up after vacation, so I have updated versions of
> >>>> suricata in unstable, and prepared the 2.0-beta1 in experimental.
> >>>>
> >>>> The build daemons seems to have caught something, since the test suite
> >>>> fails on several tests on some architectures:
> >>>>
> https://buildd.debian.org/status/package.php?p=libhtp&suite=experimental
> >>>>
> >>>>
> https://buildd.debian.org/status/fetch.php?pkg=libhtp&arch=powerpc&ver=0.5.5-1&stamp=1377013001
> >>>>
> https://buildd.debian.org/status/fetch.php?pkg=libhtp&arch=s390&ver=0.5.5-1&stamp=1377013856
> >>>>
> https://buildd.debian.org/status/fetch.php?pkg=libhtp&arch=armel&ver=0.5.5-1&stamp=1377019860
> >>>>
> >>>> For example:
> >>>> [  FAILED  ] 6 tests, listed below:
> >>>> [  FAILED  ] HybridParsing.CompressedResponse
> >>>> [  FAILED  ] HybridParsing.CompressedResponseNoDecompression
> >>>> [  FAILED  ] HybridParsing.ForcedDecompression
> >>>> [  FAILED  ] HybridParsing.DisableDecompression
> >>>> [  FAILED  ] Base64.Single
> >>>> [  FAILED  ] Base64.Decode
> >>>
> >>> Ivan has released 0.5.7, so it may be worth looking at that instead.
> >>
> >> I don't think that anything I did in 0.5.7 is going to make a
> >> difference. I was not aware of those tests failing.
> >>
> >> Do you know if there are some VM images I could use to deploy on those
> >> architectures?
> >>
> >
> > Hi Ivan and Victor,
> >
> > Looking at the changelog it seems that 0.5.7 will not change anything, I
> > will try later though.
>
> No need to try with 0.5.7; it definitely won't change anything.
>
> If you do have some time and want to try again, please configure LibHTP
> with --enable-debug. That should produce lots of output, some of which
> might be useful enough to determine the cause.
>
> In the meantime, I will try to gain access to a PowerPC architecture.
>
> Thanks.
>
>
> > I'm afraid there is no VM available. Debian developers have access to
> > some porter boxes, so I will try to build the package directly on one of
> > the failing architectures to see if I can get some more details.
> >
> > Note that the build logs give some more details on the tests output, for
> > ex in
> >
> https://buildd.debian.org/status/fetch.php?pkg=libhtp&arch=armhf&ver=0.5.5-1&stamp=1378587543
> >
> > [ RUN      ] Base64.Single
> > test_utils.cpp:59: Failure
> > Value of: htp_base64_decode_single(',')
> >   Actual: 255
> > Expected: -1
> > [  FAILED  ] Base64.Single (1 ms)


You return a char as an int and the auto conversion seems to be bitwise and
not by integer value. Try explict cast to int or assign to int and return
that?



> > [ RUN      ] Base64.Decode
> > test_utils.cpp:69: Failure
> > Value of: bstr_cmp_c(out, "this is a test..")
> >   Actual: 1
> > Expected: 0
> > [  FAILED  ] Base64.Decode (0 ms)


Function Returns int, but your return values are pointer arithmetic and get
auto converted. Probably needs range checks and explicit casts?


> >
> > and
> >
> > [ RUN      ] HybridParsing.CompressedResponse
> > test_hybrid.cpp:512: Failure
> > Value of: tx->response_message_len
> >   Actual: 189
> > Expected: 187
> >
> > Pierre


Looks like this may be due to the base64 issues.


-B


> --
> Ivan
> _______________________________________________
> Suricata IDS Devel mailing list: oisf-devel at openinfosecfoundation.org<javascript:;>
> Site: http://suricata-ids.org | Participate:
> http://suricata-ids.org/participate/
> List: https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-devel
> Redmine: https://redmine.openinfosecfoundation.org/



-- 
Brian Rectanus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openinfosecfoundation.org/pipermail/oisf-devel/attachments/20131008/949c318a/attachment-0002.html>


More information about the Oisf-devel mailing list