# Drop log false positive records possible since 6.0.6?

**URL:** <https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228>\
**Category:** Help\
**Tags:** ips, suricata, events, opnsense\
**Created:** [February 15, 2023, 8:45am UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228 "2023-02-15T08:45:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/fright/32/501_2.png) [@Fright](https://forum.suricata.io/u/Fright)\
**Post date:** [February 15, 2023, 8:45am UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/1 "2023-02-15T08:45:30Z")

</div>

Hi!  
we have two opnsense instances with Suricata in IPS mode on both. one with 6.0.5 and one with 6.0.9.  
both have eve-log drop alerts enabled with:

- drop:  
alerts: yes # log alerts that caused drops  
flows: start

both instances have two test rules like:  
pass tcp 172.17.1.0/24 any → any 225 (msg:“PASS LOCAL NET Port 225::no flags::flow to\_server::no thresholds”; flow:to\_server; classtype:misc-activity; sid:1000100; rev:1; metadata:created\_at 2023\_02\_07, updated\_at 2023\_02\_07;)  
and  
drop tcp 172.17.1.0/24 any → any 225 (msg:“DROP LOCAL NET Port 225::A12flags::flow established: to\_server::no thresholds”; flow:to\_server,established; flags: A,12; classtype:misc-activity; sid:1000103; rev:1; metadata:created\_at 2023\_02\_07, updated\_at 2023\_02\_07;)

both instances have test smtp server listening on tcp 225  
smtp session works on both instances. but…on 6.0.9 it produces “drop” event\_type records in eve-log for sid:1000103.

can it be related to [Optimization #5127: alerts: use alert queing in DetectEngineThreadCtx (6.0.x backport) - Suricata - Open Information Security Foundation](https://redmine.openinfosecfoundation.org/issues/5127) (and setting drop action in AlertQueueAppend())?  
thanks!

---

<div class="post-metadata">

**Author:** ![jufajardini](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jufajardini/32/896_2.png) [@jufajardini](https://forum.suricata.io/u/jufajardini)\
**Post date:** [February 15, 2023, 5:52pm UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/2 "2023-02-15T17:52:24Z")

</div>

Hey there!

I’m trying to better visualize this. Would it be possible for you to share logs and/or a pcap where you observe this happening?

I’m not sure if it could be related, but we did find this bug: [Bug #5806: exceptions: midstream flows are dropped if midstream=true && stream.midstream-policy=drop-flow (6.0.x backport) - Suricata - Open Information Security Foundation](https://redmine.openinfosecfoundation.org/issues/5806) that led to unexpected drops in case of packets detected as midstream (and this was only fixed in 6.0.10). Do you have the `exception policy` for `midstream` set to `drop-flow` or `drop-packet`?

If we do confirm this is a bug, we’ll ask you to report it on: [Issues - Suricata - Open Information Security Foundation](https://redmine.openinfosecfoundation.org/projects/suricata/issues)

Thanks in advance for any info you can add 🙂

---

<div class="post-metadata">

**Author:** ![jufajardini](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jufajardini/32/896_2.png) [@jufajardini](https://forum.suricata.io/u/jufajardini)\
**Post date:** [February 15, 2023, 6:34pm UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/3 "2023-02-15T18:34:51Z")

</div>

To complement my answer: I wouldn’t expect the issue to be in setting the drop action in the `AlertQueueAppend()` function, because that’s called after Suri has decided the signature alerted, already…

---

<div class="post-metadata">

**Author:** ![Fright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/fright/32/501_2.png) [@Fright](https://forum.suricata.io/u/Fright)\
**Post date:** [February 15, 2023, 7:10pm UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/4 "2023-02-15T19:10:45Z")

</div>

Hi!  
Thanks for the quick response!  
packets not actually dropped - just reported as dropped in drop log.  
To make the example more clear, I changed the drop rule. so now the rules look like this:

pass tcp 172.17.1.0/24 any → any 225 (msg:“PASS LOCAL NET Port 225::no flags::flow to\_server::no thresholds”; flow:to\_server; classtype:misc-activity; sid:1000100; rev:1; metadata:created\_at 2023\_02\_07, updated\_at 2023\_02\_07;)

and

drop tcp 172.17.1.0/24 any → any 225 (msg:“DROP LOCAL NET Port 225::no flags::flow established to\_server::no thresholds”; flow:to\_server,established; classtype:misc-activity; sid:1000101; rev:1; metadata:created\_at 2023\_02\_07, updated\_at 2023\_02\_07;)

[drop\_only.zip](https://forum.suricata.io/uploads/short-url/66NSyctebvinYg3kDFSXkECPx8P.zip) (2.2 KB)  
[pass\_and\_drop.zip](https://forum.suricata.io/uploads/short-url/gzYUBwgAjabMhzO0htPGmpMkI4e.zip) (16.3 KB)  
I attach two pcap files: the first for the case when only the drop rule is enabled (no complaints here. The smtp session hangs after receiving the server header. all as expected), the second - when both rules are enabled (the smtp session runs without problems, but messages about packet drops appear in the log)

messages in eve-log looks like:  
{“timestamp”:“2023-02-15T18:49:10.169185+0000”,“flow\_id”:662827960784155,“in\_iface”:“hn0”,“event\_type”:“drop”,“src\_ip”:“172.17.1.80”,“src\_port”:1709,“dest\_ip”:“172.17.1.105”,“dest\_port”:225,“proto”:“TCP”,“drop”:{“len”:40,“tos”:0,“ttl”:127,“ipid”:27476,“tcpseq”:1500042227,“tcpack”:1787298342,“tcpwin”:65252,“syn”:false,“ack”:true,“psh”:false,“rst”:false,“urg”:false,“fin”:false,“tcpres”:0,“tcpurgp”:0},“alert”:{“action”:“blocked”,“gid”:1,“signature\_id”:1000101,“rev”:1,“signature”:“DROP LOCAL NET Port 225::no flags::flow established to\_server::no thresholds”,“category”:“Misc activity”,“severity”:3}}.

opnsense does not set exception policy afaik: [https://github.com/opnsense/core/blob/master/src/opnsense/service/templates/OPNsense/IDS/suricata.yaml](https://github.com/opnsense/core/blob/master/src/opnsense/service/templates/OPNsense/IDS/suricata.yaml)

> [@jufajardini](#):
>
> I wouldn’t expect the issue to be in setting the drop action in the `AlertQueueAppend()`

sorry, just trying to understand how this condition can be met (if I understand correctly the reason for the entry in the log)

> <https://github.com/OISF/suricata/blob/d0b1a04eb09ebe43ca841768db81933f99a78928/src/output-json-drop.c#L372>

Thanks again!

---

<div class="post-metadata">

**Author:** ![jufajardini](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jufajardini/32/896_2.png) [@jufajardini](https://forum.suricata.io/u/jufajardini)\
**Post date:** [February 15, 2023, 7:50pm UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/5 "2023-02-15T19:50:36Z")

</div>

Hi again,

Thanks for more input. I’m sorry, I didn’t consider in my answer the possibility that the same packet would be triggering both rules.

This reminds me a bit of [Bug #5458: Reject action is no longer working - Suricata - Open Information Security Foundation](https://redmine.openinfosecfoundation.org/issues/5458), but that was fixed in 6.0.7. I’ll investigate this furhter. Could you please create a bug report?

---

<div class="post-metadata">

**Author:** ![Fright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/fright/32/501_2.png) [@Fright](https://forum.suricata.io/u/Fright)\
**Post date:** [February 16, 2023, 7:43am UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/6 "2023-02-16T07:43:47Z")

</div>

> [@jufajardini](#):
>
> Could you please create a bug report?

sure, thanks!

> **[Bug #5867: false-positive drop event\_types possible on passed packets -...](https://redmine.openinfosecfoundation.org/issues/5867)**
>
> Redmine

---

<div class="post-metadata">

**Author:** ![Fright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/fright/32/501_2.png) [@Fright](https://forum.suricata.io/u/Fright)\
**Post date:** [March 28, 2023, 5:05pm UTC](https://forum.suricata.io/t/drop-log-false-positive-records-possible-since-6-0-6/3228/7 "2023-03-28T17:05:57Z")

</div>

Thanks a lot for your help!  
for the ref. issue is fixed by [https://github.com/OISF/suricata/commit/517132b6ad0347c8402b3aace885d1b734609fec](https://github.com/OISF/suricata/commit/517132b6ad0347c8402b3aace885d1b734609fec)
