Bug 193220 - security/suricata: Update to 2.0.4, Add OPTIONS: JSON GEOIP & HTP_PORT
Summary: security/suricata: Update to 2.0.4, Add OPTIONS: JSON GEOIP & HTP_PORT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Renato Botelho
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2014-09-01 13:54 UTC by cheffo
Modified: 2014-11-22 10:07 UTC (History)
3 users (show)

See Also:


Attachments
patch for the port suricata 2.0.3 (3.64 KB, patch)
2014-09-01 13:54 UTC, cheffo
no flags Details | Diff
new patch (3.78 KB, patch)
2014-09-01 18:53 UTC, cheffo
no flags Details | Diff
Patch to bring suricata to version 2.0.4 (4.59 KB, patch)
2014-09-24 07:23 UTC, cheffo
no flags Details | Diff
poudriere testport output (323.74 KB, text/plain)
2014-10-06 10:53 UTC, cheffo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description cheffo 2014-09-01 13:54:52 UTC
Created attachment 146629 [details]
patch for the port suricata 2.0.3

This patch add knobs so administrators can build suricata with
1) JSON support
2) GeoIP support
3) Bundled libhtp

The patch does not change default settings.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-01 14:04:19 UTC
Pending review
Comment 2 cheffo 2014-09-01 14:33:03 UTC
portlint output:
WARN: Makefile: possible use of absolute pathname "/var/log/${PORTNAME}".
WARN: Makefile: possible use of absolute pathname "/tmp".
0 fatal errors and 2 warnings found.

(same as original port)

FATAL: /usr/local/poudriere/data/build/10amd64-default/ref/usr/ports/local/suricata/pkg-plist: [51]: installing pkg-config files into lib/pkgconfig.  All pkg-config files must be installed into libdata/pkgconfig for them to be found by pkg-config.
WARN: Makefile: possible use of absolute pathname "/var/log/${PORTNAME}".
WARN: Makefile: possible use of absolute pathname "/tmp".
FATAL: Makefile: category "local" must be listed first
2 fatal errors and 2 warnings found.

Hm I'm not sure from where this pkg issue come, but will look into it.
Comment 3 cheffo 2014-09-01 14:34:17 UTC
FYI: Second issue is: FATAL: Makefile: category "local" must be listed first
But this is because of my environment e.g. I keep modified ports in local/
Comment 4 cheffo 2014-09-01 18:53:14 UTC
Created attachment 146636 [details]
new patch

This patch resolves the fatal issue reported from poudriere testport.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-02 03:42:57 UTC
Great job!

If you could enumerate your changes (like a proposed "commit log") so I (and others) can understand the changes and their intent, that would be great ... Eg:

cat/port: Change summary

- Did this because blah
- Did that that because blah (portlint)
- Add FOO, BAR and BAZ support
- Make blah optional

It's also great practice for your future contributions
Comment 6 cheffo 2014-09-02 06:58:52 UTC
Will something like this work:

security/suricata: Change summary

- Added JSON knob - this allows Suricata to be compiled with JSON output support
- Added GEOIP knob - this allows Suricata to support rules with geoip word
- Added HTP_PORT knob - this make the use of www/libhtp-suricata optional. E.g. user can choose between build-in and port version.

Default behavior is not changed.
Comment 7 cheffo 2014-09-24 07:23:08 UTC
Created attachment 147629 [details]
Patch to bring suricata to version 2.0.4

security/suricata

Upgrade Suricata-IDS to version 2.0.4

Bugfixes:

Bug #1276: ipv6 defrag issue with routing headers
Bug #1278: ssh banner parser issue
Bug #1254: sig parsing crash on malformed rev keyword
Bug #1267: issue with ipv6 logging
Bug #1273: Lua – http.request_line not working
Bug #1284: AF_PACKET IPS mode not logging drops and stream inline issue

Security: CVE-2014-6603


portlint output:

WARN: Makefile: possible use of absolute pathname "/var/log/${PORTNAME}".
WARN: Makefile: possible use of absolute pathname "/tmp".

poudrirere testport suricata-2.0.4.portlint.log output:

WARN: Makefile: possible use of absolute pathname "/var/log/${PORTNAME}".
WARN: Makefile: possible use of absolute pathname "/tmp".
0 fatal error and 2 warnings found.
Comment 8 cheffo 2014-10-06 10:53:16 UTC
Created attachment 148029 [details]
poudriere testport output

Attached poudriere testport log. I guess you need this to continue?
Comment 9 cheffo 2014-10-06 11:35:41 UTC
oops - looks like I hit some bug. Please do not commit. Sorry. I'm going to investigate first whether something change in my environment or the patch introduced a bug.
Comment 10 cheffo 2014-10-06 12:44:14 UTC
False alarm :) It looks like I messed up with my local environment. The port is working as expected. Please commit if you are happy with the patch and the test results.


suricata --build-info
This is Suricata version 2.0.4 RELEASE
Features: IPFW PCAP_SET_BUFF LIBPCAP_VERSION_MAJOR=1 HAVE_PACKET_FANOUT LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK PCRE_JIT
SIMD support: none
Atomic intrisics: 1 2 4 8 byte(s)
64-bits, Little-endian architecture
GCC version 4.2.1 Compatible FreeBSD Clang 3.3 (tags/RELEASE_33/final 183502), C version 199901
compiled with -fstack-protector
compiled with _FORTIFY_SOURCE=2
L1 cache line size (CLS)=64
compiled with LibHTP v0.5.15, linked against LibHTP v0.5.15
Suricata Configuration:
  AF_PACKET support:                       no
  PF_RING support:                         no
  NFQueue support:                         no
  NFLOG support:                           no
  IPFW support:                            yes
  DAG enabled:                             no
  Napatech enabled:                        no
  Unix socket enabled:                     no
  Detection enabled:                       yes

  libnss support:                          no
  libnspr support:                         no
  libjansson support:                      no
  Prelude support:                         yes
  PCRE jit:                                yes
  LUA support:                             no
  libluajit:                               no
  libgeoip:                                no
  Non-bundled htp:                         yes
  Old barnyard2 support:                   no
  CUDA enabled:                            no

  Suricatasc install:                      no

  Unit tests enabled:                      no
  Debug output enabled:                    no
  Debug validation enabled:                no
  Profiling enabled:                       no
  Profiling locks enabled:                 no
  Coccinelle / spatch:                     no

Generic build parameters:
  Installation prefix (--prefix):          /usr/local
  Configuration directory (--sysconfdir):  /usr/local/etc/suricata/
  Log directory (--localstatedir) :        /var/log/suricata/

  Host:                                    amd64-portbld-freebsd10.0
  GCC binary:                              cc
  GCC Protect enabled:                     yes
  GCC march native enabled:                yes
  GCC Profile enabled:                     no
Comment 13 commit-hook freebsd_committer freebsd_triage 2014-11-11 15:58:44 UTC
A commit references this bug:

Author: garga
Date: Tue Nov 11 15:57:54 UTC 2014
New revision: 372453
URL: https://svnweb.freebsd.org/changeset/ports/372453

Log:
  - Update suricata to 2.0.4 [1]
  - Added JSON knob - this allows Suricata to be compiled with JSON output support
  - Added GEOIP knob - this allows Suricata to support rules with geoip word
  - Added HTP_PORT knob - this make the use of www/libhtp-suricata optional. E.g.
    user can choose between build-in and port version.
  - Unbreak PLIST renaming sample files from -sample to .sample

  PR:		193220 [1]
  Submitted by:	cheffo [1]
  Approved by:	maintainer timeout (> 2 months)
  Security:	CVE-2014-6603

Changes:
  head/security/suricata/Makefile
  head/security/suricata/distinfo
  head/security/suricata/pkg-plist
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2014-11-22 10:07:29 UTC
Thanks Renato!