Snort 2.9.4.1 Pkg 2.5.4 – Fix for SO rules version mismatch and failed startup
-
Allright mate!! You doing a hell of a job for the rest of the community!
-
bmeeks…very impressed with your debugging abilities :-) As a guy who coded a long time back, it's refreshing to see someone who can get under the hood and ID issues so quickly.
Cheers,
Dennis. -
bmeeks…very impressed with your debugging abilities :-) As a guy who coded a long time back, it's refreshing to see someone who can get under the hood and ID issues so quickly.
Cheers,
Dennis.Thanks, but I must admit I stared at that code for like an hour and did not see the bug. I knew it had to be there somewhere, and finally I noticed the misplaced memset() call. After that it was like … Doh!! ... why didn't I see that first thing ?? :D
Bill
-
Please let us know when it will be fixed.
So we can pull new package.
Thanks a lot for all efforts -
Please let us know when it will be fixed.
So we can pull new package.
Thanks a lot for all effortsI have submitted a Pull Request via GitHub that contains a fix for the whitelist parsing issue. The pfSense developers have to accept my patch into the packages repository and then compile it into the new binary for Snort. Changes to the binary are a bit more involved to publish than changes to the GUI code.
Bill
-
Any news on this ?
-
waiting as well for this.
-
Any news on this ?
My Pull Request for the Spoink patch was accepted, but so far it has not been incorporated into a new build of the binary as far as I can tell. I don't know what the process is nor the timeline for the binary side. On the GUI side, once a Pull Request is accepted by the Core Team it is immediately available for download. I know the binaries have to be built, but I don't know if that is automated (I think it is) or a human has to intervene.
Bill
-
Just uninstall , then install package.
It looks like is NOT rebuilt yet , I see my WAN blocked . :(
(Snort 2.9.4.1 Pkg 2.5.4 , Emergingthreats rules only )
Thanks -
I reported that to Bmeeks some time ago since I saw my WAN blocked as well. It must be the implementation of Snort into PFsense that is causing this behaviour…
-
I found my WAN blocked yesterday. I removed the block, but it came right back. Restarted the service and it has been running fine since. Never saw this before upgrading to Snort 2.9.4.1.
If it matters, I do have the paid VRT rules. (Well worth $2.50/month. I think it's a good value and money worth spent)
-
I found my WAN blocked yesterday. I removed the block, but it came right back. Restarted the service and it has been running fine since. Never saw this before upgrading to Snort 2.9.4.1.
If it matters, I do have the paid VRT rules. (Well worth $2.50/month. I think it's a good value and money worth spent)
Until my latest bug fix is incorporated into the binary build of Snort on pfSense, you will see your WAN IP (and any other normally whitelisted IPs) get blocked. The blocking of offenders in Snort on pfSense is done with an optional output plugin.
Snort, natively, has no "blocking" capability. The Snort team leaves that to others. There are two popular methods in use: Snortsam and Spoink. The pfSense folks chose Spoink. This works as an optional output plugin compiled into the Snort binary. The Snort source code is patched during the pfSense package build process to incorporate the Spoink output plugin. This plugin receives each Alert from Snort as it is on the way to the log files. It compares the IP addresses in the Alert (SRC, DST or BOTH according to how you configure blocking) to the list of Whitelist IPs. If the offending IP is NOT in the whitelist, then an API call is made into the pfSense packet filter code to insert a blocking rule for that IP. The IP whitelist is just a text file in the same directory as the Snort configuration files. That file is created by the GUI code and then read at Snort startup by the Spoink plugin patched into Snort.
The bug that got introduced in 2.9.4.1 is in the Spoink plugin patch. During startup, when it reads the Whitelist file and stores the addresses in there into the in-memory table of whitelist IP addresses, it zeroes out the data it reads from the file just prior to parsing it! So it sees an "empty" whitelist file and thus blocks ALL alerting IP addresses. The intent of the zero-out call was to initialize the buffer with zeros prior to reading in the whitelist, but the memory clearing call was typed in the wrong spot such that it clears the buffer immediately after it was just filled with the file's data. I submitted a fix for this bug, but it has not made its way into the compiled binary package yet. Until it gets fixed, this bug will keep causing people issues with their WAN IP and other normally whitelisted IPs getting blocked.
Bill
-
ERMAL WE NEED YOU URGENTLY!!
-
Bill, that explanation was maybe my favourite post ever here. While I make no claims on code prowess, I really appreciate the under-hood explanation of what's going on. I used to try the variety of work-arounds that are normally offered up after debugging a package. It's a lot more time efficient however to watch posts like yours, and enter back into debugging/testing contribution phase once it looks like things "should" work. Again thanks to all for their efforts.
Cheers,
Dennis. -
Until my latest bug fix is incorporated into the binary build of Snort on pfSense,…......
Is it possible for us to apply this fix ourselves? If so I am sure we would all be very grateful if you could describe the solution for us.
Kind regards
-
I wasn't aware this needed a manual package build, I just kicked one off on both the 8.1 (2.0.x) package builders.
-
package build finished and is uploaded. Entirely untested, please try it out and report back.
-
@cmb:
package build finished and is uploaded. Entirely untested, please try it out and report back.
Thanks for everyone's hard work on this. :)
I just tested out the latest build and it seems to have fixed the wan blocking problem.
Thanks!
-th3r3isnospoon
-
@cmb:
I wasn't aware this needed a manual package build, I just kicked one off on both the 8.1 (2.0.x) package builders.
Thanks! When I submitted the Pull Request, I was also unaware that a manual build would be required. Next time I will raise the flag for the manual rebuild of the binary.
Is there a reason the Snort package is different from the other packages with regards to the manual build?
Bill
-
Just uninstall , then install package.
It looks like is working , I see same IPs blocked ,but WAN is OK so far.
(Snort 2.9.4.1 Pkg 2.5.4 , Emergingthreats rules only )
Thanks