Commit Graph

32 Commits (f5ba8eb6db8d5e4ed0c2df3189cb19c495f2cfa9)

Author SHA1 Message Date
Last G 8ae11f73b2 Added parentheses to fix Eclipse static code analysis
Fixed bug in action priority (REJECT_DST had lowest prio)
12 years ago
Last G 6dd7b27ffc Added right return values to non-void functions with "forever" loop
to fix Eclipse static code analysis
12 years ago
Last G 56e0ab35e9 Fixes with missing return value in main function 12 years ago
Victor Julien 6441a53d3c libhtp: updated bundled libhtp to 0.2.11 12 years ago
Victor Julien 5a6c8c0f01 minor misc changes: update htp ver, add htp ver to --build-info, clean up 12 years ago
Eric Leblond 493a68ebdc backport oom fixes
This is a backport of
9ea5e0e3e4
12 years ago
Victor Julien 76f0838a9f libhtp: harden code against malloc failures. Bug #587. 12 years ago
Victor Julien 0b68da0b31 libhtp: don't use internal iterator
It violates thread safety. #601.

Suricata assures thread safety on the flow level for HTTP tracking. Part of the flow is (in case of HTTP) libhtp's htp_connp_t state. At startup the libhtp glue layer, app-layer-htp initializes as many htp_cfg_t instances as there are libhtp server configurations in the yaml. At HTTP session start, we look up the proper htp_cfg_t based on the server ip and pass it to htp_connp_create.  A ptr to the relevant htp_cfg_t is part of the htp_connp_t. The htp_cfg_t contains "hooks". The are registered based on yaml config at init time.

The hooks have lists of type list_t. The list is run with a built in iterator. The iterator is reset at the start of each "hook_run_all". Since multiple flows share the same htp_cfg_t flow A can reset the iterator while flow B is using it. The flow lock has no effect as flows share the htp_cfg_t.

This has been observed in real traffic. hook_response_body_data was run on the same data multiple times, leading to corrupt extracted files.
12 years ago
Victor Julien 6e0f8a3cb5 htp: update version numbers of bundled htp 12 years ago
pi-rho 0df4c5838d spelling corrections documented in redmine bug#533 12 years ago
Victor Julien 0c98980e21 http: add unittest to test \r in header line. 12 years ago
Victor Julien d236e68b62 htp: keep track of header line terminators so http_raw_header can reconstruct exact headers. 12 years ago
Victor Julien 40cda7e149 Support FNAME and FCOMMENT extensions in gzip'd http content. 13 years ago
Anoop Saldanha 1f0272afeb libhtp fix for response body processing. Increment data counter for response body processing when no contentlength or chunked scheme is used but the server closes the connection 13 years ago
Eric Leblond aef4835c56 htp OpenBSD: fix inline related warning 13 years ago
Victor Julien ef52ba8f57 libhtp: update to sync with upstream 0.2.x
Patches applied are:

commit 85f5bbc39dda2eaf03ccb6111cbf5daf1c7b75f9
Author: Craig Forbes <cforbes@qualys.com>
Date:   Wed Mar 21 16:45:04 2012 +0000

    Backport of STREAM_STATE_TUNNEL fix to 0.2.x.

    Return STREAM_STATE_TUNNEL after entering a tunnel.

commit cfbe28cd4ddde6d77c5b0d5935c8717834971441
Author: Craig Forbes <cforbes@qualys.com>
Date:   Wed Feb 29 16:52:44 2012 +0000

    Backport of the fix for HTP_AMBIGUOUS_HOST flag.

    The flag is only set when the URI host on the request line is different
    than the value in the Host: request header.

    Resolves https://github.com/ironbee/libhtp/issues/20

commit 196dfb1c8b7a5996389c719e2c912163c5607916
Author: Brian Rectanus <brectanus@qualys.com>
Date:   Wed Feb 8 08:35:46 2012 -0600

    Add missing function declaration in header.

commit 7878fec818167fcdf7c8c4852ac0dafa1ae445f1
Author: Brian Rectanus <brectanus@qualys.com>
Date:   Wed Feb 8 08:35:07 2012 -0600

    Revert part of previous patch, which was invalid.

commit bafef3d4cbfc307960677c6bd682ae195fe986cd
Author: Brian Rectanus <brectanus@qualys.com>
Date:   Wed Feb 8 08:36:06 2012 -0600

    Update version to next dev release.

commit 62cfdb41ba84f2666c7526e2e5d9e10ab8e220f1
Author: William Metcalf <wmetcalf@qualys.com>
Date:   Wed Feb 1 13:19:48 2012 -0600

Many thanks to Will, Brian and Craig.
13 years ago
Victor Julien b0650b9c3b Update bundled libhtp to 0.2.7. 13 years ago
Steve Grubb a65eb59c41 Add relro flags to libhtp
Hello,

The main suricata program can detect and use relro/bind now linker flags. But
the directive is per linked object. This means that while the app has
protection, its code segment containing libhtp does not. The patch below passes
the configure option to libhtp and let's it make use of the compiler's
security protection.

Signed-off-by: Steve Grubb <sgrubb@redhat.com>
13 years ago
Victor Julien 7595785547 libhtp/m4 dir won't be created on CentOS 5.3 by autogen.sh, so work around that by having it in git 14 years ago
Victor Julien 4ed0ca14bc Change libhtp configure to not enable debug when suricata does. 14 years ago
Gerardo Iglesias Galvan 505c5d5cf5 Update libhtp to 0.2.6 14 years ago
Victor Julien c3bb04f609 Update libhtp/INSTALL doc based on autogen.sh. 14 years ago
Victor Julien 3dfed0891f Update bundled libhtp to libhtp svn tag 0.2.5. 14 years ago
Victor Julien 5f4d681a42 Apply revision 233 and 234 from libhtp to improve memory handling when Suricata runs out of memory. 14 years ago
Victor Julien 926e003523 Updated install doc after automake run. 14 years ago
Eric Leblond fcac4d2896 autotools: add automatic files generation
This patch modifies autogen.sh so that it is able to generate
config.sub, config.guess and ltmain.sh files which are not
anymore part of the git tree.
15 years ago
William Metcalf d0541aa571 Integration of libhtp-0.2.3 rev 199 15 years ago
Victor Julien 50e41817a7 Share content id's between identical patterns. 15 years ago
Victor Julien ff664c9f6d Reenable --enable-htp-debug option for libhtp so Suricata's --enable-debug won't automatically enable libhtp's debug as well. 15 years ago
Victor Julien 045eaec95b Fix file permissions. 15 years ago
William Metcalf 260d0d7673 Steve Grub fixes... Thanx Steve! 15 years ago
William Metcalf 0fe4373b67 Rolled back to 0.2.x branch renamed htp to libhtp 15 years ago