Bug 10770 - Enabling Snort causes system crash
Summary: Enabling Snort causes system crash
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: armv5tel All
: - Unknown - Balancing
Assignee: Assigned to nobody - feel free to grab it and work on it
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 08:55 UTC by Timmothy Wilson
Modified: 2017-10-09 16:59 UTC (History)
5 users (show)

See Also:


Attachments
Screenshot of "tail -f /var/log/messages" (44.81 KB, image/png)
2015-03-15 18:25 UTC, Timmothy Wilson
Details
Kernel crash messages (6.64 KB, text/plain)
2015-03-23 17:46 UTC, Timmothy Wilson
Details
Kernel crash messages (2016-10-09) (6.74 KB, text/plain)
2016-10-09 12:14 UTC, Timmothy Wilson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timmothy Wilson 2015-03-11 08:55:55 UTC
Dear IPFire-Team,

I am running IPFire 2.17 on a Wandboard Quad, my fireinfo profile is available here: http://fireinfo.ipfire.org/profile/5b2bd7f27142f30ab9a173bf09e68d2dc8c68068

Besides some issues, IPFire works fine except snort. Whenever I activate Snort and select some rules, the system crashes. There is no access via SSH/HTTPS any more, and "ping" results with "Destination Host Unreachable".

The crash has been reproduced twice. The only solution I know at the moment is to disable snort. But since I want snort to be enabled (many attacks coming from the internet), this is not a very good solution.

Is there any other possibility to fix this issue?

Thanks in advance,
Timmothy Wilson
Comment 1 Michael Tremer 2015-03-11 11:33:49 UTC
First of all: Snort gives you nothing.

Secondly: Please attach the trace of the crash or any useful debugging information.
Comment 2 Michael Tremer 2015-03-11 11:34:32 UTC
And please do not change the bug priorities.
Comment 3 Timmothy Wilson 2015-03-11 14:18:31 UTC
(In reply to Michael Tremer from comment #1)
> First of all: Snort gives you nothing.
I don't agree with that. Why does IPFire contain snort if it is unuseful?
(Of course, this doesn't belong to the topic.)
> 
> Secondly: Please attach the trace of the crash or any useful debugging
> information.
How do I get those? (I'm a newbie, you know) I didn't see any printed on the serial console. The system just freezes, with no trace messages or anything.

If the output of any command might help, please tell me.

(In reply to Michael Tremer from comment #2)
> And please do not change the bug priorities.
Oh, I'm sorry.
Comment 4 Michael Tremer 2015-03-12 01:03:31 UTC
Maybe Arne can advice...
Comment 5 Timmothy Wilson 2015-03-12 11:36:15 UTC
(In reply to Michael Tremer from comment #1)
> First of all: Snort gives you nothing.
> 
> Secondly: Please attach the trace of the crash or any useful debugging
> information.
I checked /var/log/snort:
$ ls -lah
total 12K
drwxr-xr-x  2 snort snort 4.0K Mar 10 19:01 .
drwxr-xr-x 15 root  root  4.0K Mar 12 02:46 ..
-rw-r--r--  1 root  root     0 Mar 10 19:01 alert
-rw-r--r--  1 root  root    20 Mar 10 19:01 alert.1.gz
-rw-r--r--  1 root  root     0 Mar  9 10:21 snort.log.1425892889
-rw-r--r--  1 root  root     0 Mar 10 18:06 snort.log.1426007213
-rw-r--r--  1 root  root     0 Mar 10 18:08 snort.log.1426007295

The tree log files are blank. In my opinion, this is strange because if snort would crash, there would be some lines in the logs.

I really have no idea what to think about this. Sorry.
Comment 6 Timmothy Wilson 2015-03-15 15:57:08 UTC
Hello,

I tried to enable snort without any rules.

This works. I am now trying to enable just one or two rules...
Comment 7 Timmothy Wilson 2015-03-15 16:01:15 UTC
(In reply to Timmothy Wilson from comment #6)
> Hello,
> 
> I tried to enable snort without any rules.
> 
> This works. I am now trying to enable just one or two rules...
I enabled "emerging_activex.rules" (containing 220 rules?). Works.

Maybe the bug is in one of the snort rules causing an infinitive loop?
Comment 8 Timmothy Wilson 2015-03-15 18:24:05 UTC
Activated several rules, no problems seen until activating ruleset "misc".
Then the system froze (see screenshot attached, it is showing the output of "tail -f /var/log/messages").

Recovered the system by restoring an old snort.conf, now the "ids.cgi" page in the WebIF crashes.

Seems like a rule in "misc.rules" causes the crash...
Comment 9 Timmothy Wilson 2015-03-15 18:25:34 UTC
Created attachment 274 [details]
Screenshot of "tail -f /var/log/messages"

Enabled "misc.rules" at 17:26, then the system froze.
Comment 10 Timmothy Wilson 2015-03-15 19:09:52 UTC
Dear IPFire-Team,

since I recovered the system, I tried to enable a snort configuration which worked before the crash:

Active on RED
Enabled rulesets:
activex
attack_response
ciarmy
dshield
mobile_malware
scan
exploit
botcc
rbn
rbn_malvertises
dos
netbios
shellcode
malware # quite slow!
trojan # quite slow!
drop
dns
worm
web_client
user_agent

I did not install Guardian.

After I entered the configuration above in the WebIF and hit "Update", the system froze, just like the other times before.

Because of this, the bug doesn't seem to be limited to "misc.rules".

For a workaround, I disabled snort temporarily.

Any idea how to solve this?

Again there are no log entries.

Thanks in advance,
Timmothy Wilson
Comment 11 Timmothy Wilson 2015-03-23 17:46:42 UTC
Created attachment 279 [details]
Kernel crash messages

Dear IPFire-Team,

I finally got some crash messages by the kernel.

The crash occured ~ 2min after enabling snort.

I hope this helps.

Timmothy Wilson
Comment 12 Timmothy Wilson 2015-03-27 18:22:37 UTC
Issue is not fixed in core update 89 - tested a few hours ago.
Comment 13 Timmothy Wilson 2015-03-29 17:36:13 UTC
Removed needinfo flag - the kernel crash messages should do it.

If there is anything which would help you (output of commands, ...), please let me know.
Comment 14 Charles 2015-04-21 05:50:37 UTC
I am also having this same issue on 2.17 Core Update 89.  I also noticed when I try to enable snort for green red and blue that it is not running on all 3 interfaces.  Sometime it is any 2 of the 3 or any 1 of the 3 bit never all 3.

Has something changed in snort or could it be the rules it is downloading and using?
Comment 15 Charles 2015-04-21 05:51:42 UTC
It does this on a fresh install.
Comment 16 Arne.F 2015-06-04 07:43:48 UTC
The IPFire main team have not the resources to investigate and fix this.

I fear upstream will also not found and fix it because it only occours on kernel 3.14 with grsecurity on arm.
I think no other distribution use the combination.

Im thinking about disabling snort on arm completly.
Comment 17 Timmothy Wilson 2015-06-04 20:45:02 UTC
(In reply to Arne Fitzenreiter from comment #16)
> The IPFire main team have not the resources to investigate and fix this.
That's okay for me - you can't save the world. ;-)
> 
> I fear upstream will also not found and fix it because it only occours on
> kernel 3.14 with grsecurity on arm.
Does this mean that it basically works with newer kernels? I saw that you can't upgrade to a newer one unless the grsecurity project released their stable version for newer kernels.
> I think no other distribution use the combination.
I think so, too.
> 
> Im thinking about disabling snort on arm completly.
If snort would work with newer kernels and we just have to wait for the grsecurity stuff, I would prefer to leave it enabled.

In my opinion, disabling snort on arm would be a huge loss of security; many people run arm boards as private routers, and it would be very nice if this feature would not be limited to i686-systems.

What do you think about this?

Best regards,
Timmothy Wilson
Comment 18 Arne.F 2016-01-20 11:22:55 UTC
Seems to be a compiler bug because current nightly builds work without changes on kernel or snort after we had updated the gcc.
Comment 19 Timmothy Wilson 2016-01-26 12:11:54 UTC
(In reply to Arne Fitzenreiter from comment #18)
> Seems to be a compiler bug because current nightly builds work without
> changes on kernel or snort after we had updated the gcc.

Hello Arne,

tanks for your reply.

At the moment I have no spare system to test this. :-( Nevertheless, it is great news!

Best regards,
Timmothy Wilson
Comment 20 Robert Parker 2016-04-16 18:28:55 UTC
crash still exists with IPFire 2.19 (armv5tel) - Core Update 100
which has updated kernel, gcc etc.

----------------------------------

PAX: snort:2125, uid/euid: 0/0, attempted to access userland memory at 0011aea0
Internal error: : 1b [#1] SMP ARM
Modules linked in: nfnetlink_queue nfnetlink_log nfnetlink ipt_MASQUERADE ccm xt_mac xt_nat xt_mark xt_policy xt_TCPMSS xt_conntrack xt_comment ipt_REJECT xt_LOG xt_limit iptable_raw iptable_mangle iptable_nat nf_nat_ipv4 nf_nat iptable_filter 8021q garp vfat fat sch_fq_codel arc4 rtl8192cu(O) rtl_usb(O) rtl8192c_common(O) b53_mdio rtlwifi(O) b53_common mac80211(O) swconfig cfg80211(O) compat(O) stmmac ptp pps_core sunxi_wdt lp parport ahci_sunxi ahci_platform libahci
CPU: 0 PID: 2125 Comm: snort Tainted: G           O 3.14.65-ipfire-multi #1

CPU:   Allwinner A20 (SUN7I)
Board: Bananapi
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
Comment 21 Timmothy Wilson 2016-04-22 13:24:12 UTC
My ARM-system is now running on Core Update 100 with snort enabled. There were no issues at all, the system load is remarkably low (~ 0.2 idle).

However, I haven't tried it on a Banana Pi yet, but it sounds weird to me that snort is still causing crashes on the same architecture.
Comment 22 Timmothy Wilson 2016-10-09 12:14:25 UTC
Created attachment 482 [details]
Kernel crash messages (2016-10-09)

Seems like this issue is still open.

My firewall (profile: http://fireinfo.ipfire.org/profile/20df6dc5b9451a5816f5c10a594ac11d31bc302e) cashed with a grsec error today.

Please see the kernel crash message attached.