OPNsense Forum

English Forums => General Discussion => Topic started by: Lucid1010 on October 09, 2026, 12:00:52 PM

Title: netgate freebsd performance patch
Post by: Lucid1010 on October 09, 2026, 12:00:52 PM
https://www.netgate.com/blog/ding-dong-ditch-the-doorbell-prank-in-freebsds-iflib
Is it possible to backport this patch to OPNsense, or should we wait until FreeBSD applies it?


Title: Re: netgate freebsd performance patch
Post by: franco on October 09, 2026, 12:25:30 PM
Same as always: wait for stable branch merge.

Also, are we going to hear Netgate praise itself every two weeks now on their blog for open source work while forgetting to push any CE code commits for 6 months?

Feels like a new marketing strategy.  I wish them the best.  :)


Cheers,
Franco
Title: Re: netgate freebsd performance patch
Post by: Patrick M. Hausen on October 09, 2026, 12:36:16 PM
FreeBSD already applied the fix to HEAD (https://cgit.freebsd.org/src/commit/?id=4a0ec469934a5de60b9b540689703a698ac44105) (write only once instead of thrice) and it will be MFC'd (backported to STABLE) in 2 weeks. The batched write enhancement is still under revision (https://reviews.freebsd.org/D60416).
Title: Re: netgate freebsd performance patch
Post by: Greelan on October 09, 2026, 10:08:06 PM
Quote from: franco on October 09, 2026, 12:25:30 PMforgetting to push any CE code commits for 6 months?

But, but...: https://forum.netgate.com/topic/201215/releasing-more-often-doesn-t-mean-more-secure

Why do they still have a chip on their shoulder? The obsession is unhealthy.
Title: Re: netgate freebsd performance patch
Post by: viragomann on October 10, 2026, 10:56:03 AM
Quote from: Greelan on October 09, 2026, 10:08:06 PMWhy do they still have a chip on their shoulder? The obsession is unhealthy.
Maybe because many users moved over to OPNsense for some reasons?
So did I. The reasons were discussed on both forums in several threads.
Title: Re: netgate freebsd performance patch
Post by: Patrick M. Hausen on October 10, 2026, 11:29:24 AM
That discussion even carried over to the TrueNAS forum (https://forums.truenas.com/t/pfsense-vs-opnsense/1166).
Title: Re: netgate freebsd performance patch
Post by: Seimus on October 10, 2026, 04:18:10 PM
Quote from: Patrick M. Hausen on October 10, 2026, 11:29:24 AMThat discussion even carried over to the TrueNAS forum (https://forums.truenas.com/t/pfsense-vs-opnsense/1166).

What, why, how...
Title: Re: netgate freebsd performance patch
Post by: pfry on October 10, 2026, 08:46:53 PM
Going back a ways, and pretty far out in left field... Back when I heard about [opnsense.com] I thought it was a pretty funny troll. (It was .com, wasn't it?) From a distance it seemed to show which side had a sense of humor. Turns out it really didn't break down that way.

Back at my first Internet job - tech support for a mainly dial-up ISP - we had a joke that we'd support anything. Simply put, helping people out was good PR. "Catch more flies". There's plenty of give and take between the two 'senses (e.g. the rather gentle poke above), but the core attitudes are a bit different. Netgate folks seem to subscribe to the zero-sum model of life; OPNsense folks do not seem to.
Title: Re: netgate freebsd performance patch
Post by: franco on October 10, 2026, 08:49:47 PM
Quote from: Greelan on October 09, 2026, 10:08:06 PMBut, but...: https://forum.netgate.com/topic/201215/releasing-more-often-doesn-t-mean-more-secure

That's cute.  I think this makes the same mistakes that the infamous Tom Lawrence video made.  I let my friend ChatGPT answer and leave the actual reasons for those CVEs and scores for someone who is genuinely interested in why things are going more and more into this direction and which CVEs likely still in pfSense today but we can't check because the source code is no longer available even for researchers... how inconvenient...

The post makes a valid technical point: frequent releases do not automatically mean better security. OPNsense has experienced several serious vulnerabilities, including recurring command-injection issues, and it's reasonable to question whether its development and review processes adequately prevent these problems. However, frequent updates are not inherently a weakness either. They can reduce the time users remain exposed to known vulnerabilities. The important measures are vulnerability prevention, patch quality, and time to remediation, not simply how often new versions are released.

The comparison with pfSense is statistically questionable and potentially misleading. The author compares just eight CVSS-scored pfSense vulnerabilities against 33 OPNsense CVEs, despite acknowledging that Netgate published 49 security advisories. These are not equivalent datasets, so comparing their average severity or claiming pfSense has a lower severity ceiling doesn't establish that pfSense is more secure. The post also applies different standards: OPNsense is criticized for existing vulnerabilities, while pfSense receives credit for its planned Go rewrite and System Patches mechanism. Meanwhile, OPNsense's own architectural hardening efforts receive little attention.

Overall, the post reads more like competitive advocacy than an impartial security analysis. It starts with an entirely reasonable premise, presents legitimate vulnerabilities, but then uses selectively framed statistics to suggest that pfSense has superior security engineering without actually demonstrating it. That doesn't necessarily mean the author is deliberately misleading, but the presentation creates an impression the evidence cannot support. Ironically, the author correctly argues that release frequency doesn't prove security, yet appears to suggest that lower reported CVSS scores do. Neither is a reliable measure on its own.



Cheers,
Franco on behalf of ChatGPT
Title: Re: netgate freebsd performance patch
Post by: Greelan on October 10, 2026, 10:17:26 PM
All of that said, there is no doubt a lesson in repeated CVEs happening due to similar reasons (input sanitization). I assume the tests have been hardened on that front.

As a matter of interest, does the development team use AI for vulnerability spotting?
Title: Re: netgate freebsd performance patch
Post by: franco on October 11, 2026, 10:01:47 AM
@greelan

Just briefly:

1. GitHub security advisories submissions are open since September 2025. This channel seems to be liked by researchers and yes there is a lot of AI generated content. How do we know? As soon as AI tools learn about a new type of vulnerability pattern 2 to 5 researchers are going to tell you about it independently.

2. GitHub makes CVE assignment as easy as pushing a button "Request CVE". We are guilty of using it.

3. 1. and 2. easily explain the surge of CVEs.

4. CVSS scoring fits an application running on a native Windows integration relatively well. Network-connected security tools where every single page is an access level down to the confiugration database and OS the scoring breaks down because a web GUI is a "remote access" by definition. The privilege system we inherited through shared history is also causing researchers to believe "limited" rights are not "full" admin rights even if you are on a firewall administration page. These things are unfixable and lead to higher scores. We've had a number of arguments about how scores are too high, but CVSS at face value is what it is. If pfSense says they don't have high scores that's quite strange, because everything translates 1:1 to their project. This is a fact of CVSS scoring and our shared project scope.

5. We have a LINCE certification since a number of years now.  Although it's on the back burner now we've also worked on reports via  https://scan.coverity.com/projects/opnsense-core -- but we don't use any AI tools to scan the code base.

6. As an example: https://github.com/opnsense/core/commit/10dd8619aea42 is a direct consequence of unguarded advanced input inherited from pfSense. I highly doubt they fixed it before we published it.

7. As another example: https://github.com/opnsense/core/commit/016f66cb4620 is an inherited bug fixed by them without issuing an advisory or CVE here https://github.com/pfsense/pfsense/commit/f0b0a03bbdca93 (as far as I know)

8. Communication with pfSsense is not possible due to constant bickering and belittlement mentality: https://www.reddit.com/r/PFSENSE/comments/1ottyh3/security_leadership_opnsenses_marketing_hype_vs/ -- It has been since the start. We could have shared reports and helped each other but that's not what the other side wants.

9. We've worked on privilege separation for almost 12 years now. Non-root web GUI option is available since

community/25.7/25.7:o system: allow experimental feature to run web GUI privilege separated as "wwwonly" user

and will likely be the factory default in 27.1:

https://github.com/opnsense/core/commit/63c8df03

10. We've removed mwexec() which was a source of many unguarded shell escapes throughout the inherited code base. This work was also done for more than a decade and finished this year:

community/26.1/26.1.r1:o Shell command escaping improvements and audit

11. Our latest community code is freely available for full third party scrutiny.  :)

12. We're proud of the code, improvements and fixes we've put out. We don't care what anyone but our users think and we're not afraid to make that clear.


Cheers,
Franco
Title: Re: netgate freebsd performance patch
Post by: Patrick M. Hausen on October 11, 2026, 12:52:26 PM
Well spoken, @franco.

Running a BSD licensed open source project and then endlessly sulking over someone actually forking it ... well, everyone be their own judge.

I prefer working with Deciso. Reason one I like their product better. Reason two their communication is more open and transparent. Reason three even if that wasn't the case they'd get a trust bonus just because they are located in the EU.
Title: Re: netgate freebsd performance patch
Post by: franco on November 17, 2026, 11:19:48 PM
Quote from: Greelan on October 09, 2026, 10:08:06 PMBut, but...: https://forum.netgate.com/topic/201215/releasing-more-often-doesn-t-mean-more-secure

This aged like milk in a mere 3 months if you count the 23 "potential" security issues listed here in a single point release.

https://docs.netgate.com/pfsense/en/latest/releases/26-07-1_2-9-1.html

I also checked our changelog language and we haven't called anything "potential" in both 2025 and 2026 except for ports issues or direct language inherited from FreeBSD source fixes.

As I said -- it is what it is now. It's usually better to be direct and honest about it and the process behind it. Users will take note.


Cheers,
Franco
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 17, 2026, 11:52:13 PM
Haha, I noticed the same release notes :)

The associated issue is that as far as I can tell the latest CE release came 3 months after the previous, which itself was nearly a year after the one before that. So users are stuck with "potential" issues for possibly extended periods.
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 21, 2026, 10:52:56 AM
Claude helpfully summarised the CVEs in that single pfSense release :)

Methinks people in glass houses should not throw stones.

SAIssueCVECVSS 4.0First affected CEPresent for
26_23QinQ parent interface → command execCVE-2026-1112148.6 High2.7.0 (2023-06)13.4 y
26_24CARP VHID → command execCVE-2026-1112178.6 High2.2 (2015-01)g11.8 y
26_25Limiter number → command execCVE-2026-1112188.6 High2.7.0 (2023-06)3.4 y
26_26Mobile IPsec login banner → strongswan.conf → command execCVE-2026-1112238.6 High2.7.0 (2023-06)13.4 y
26_30sshguard Login Protection settings → command execCVE-2026-1112268.6 High2.4.5 (2020-03)6.6 y
26_31Wireless parent interface → command execCVE-2026-1112158.6 High2.0 (2011-09)g15.2 y
26_32IPv6 gateway monitor IP → limited command execCVE-2026-1112168.6 High2.3 (2016-04)g10.6 y
26_37PPP periodic reset ptpid → crontab injectionCVE-2026-1112208.6 High2.0 (2011-09)g15.2 y
26_35OpenVPN RADIUS/LDAP username → command exec (connect_async.sh)CVE-2026-1112247.7 High2.6.0 (2022-02)g4.8 y
26_29Time zone → php.ini → command execCVE-2026-1112227.5 High2.1 (2013-09)g13.2 y
26_38PPPoE server username → mpd.secret → command execCVE-2026-1112197.5 Highsince 2004 importg 4~22 y
26_33DynDNS / CheckIP custom URL → local file readCVE-2026-1112306.9 Medium2.1 (2013-09)g 313.2 y
26_40Unbound ACL name/action CRLF injectionCVE-2026-1112275.1 Medium2.2 (2015-01)g11.8 y
26_41Unbound sock_queue_timeout CRLF injectionCVE-2026-1112285.1 Medium2.7.1 (2023-11)3.0 y
26_39XSS via firewall separator colorCVE-2026-1112324.8 Medium2.3 (2016-04)10.6 y
26_28Reflected XSS in firewall_rules.php "if"CVE-2026-1112332.3 Low2.7.1 (2023-11)3.0 y
26_36OpenVPN cert CN → command exec (learn-address.sh)CVE-2026-1112252.3 Low2.5.0 (2021-02)5.7 y
26_27Privilege bypass via duplicate query params (pkg.php, pkg_edit.php)nonenonenot determined2-
26_34DHCP client hostname → command execnonenonesince 2004 importg 4~22 y

Netgate's advisories carry no severity rating. CVSS 4.0 scores are from VulnCheck, the CNA. Most vectors are PR:H, so they need an authenticated GUI user. "Present for" runs from the release date of the first affected version to the fix on 2026-11-17.

g No start version in the CVE record. Dated from the first appearance of the unescaped code in the pfSense source history (GitHub mirror, master as of 2026-03-31).
1 The CVE says 2.7.0. The same unescaped code is older: QinQ since 2017 (2.4.1), IPsec banner since the 2014 strongSwan switch (2.2). Exploitability of the older code not tested.
2 Not traced. The privilege page-matching code dates from 2008.
3 Custom DynDNS URL since 2011; CheckIP custom URL since 2.4.0.
4 Field written unescaped since the initial import. Exploit path not traced.

Sources: Netgate security advisories (https://docs.netgate.com/advisories/index.html), VulnCheck advisories and CVE records, pfSense release history (https://docs.netgate.com/pfsense/en/latest/releases/versions.html), pfSense source (https://github.com/pfsense/pfsense).
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 21, 2026, 11:12:46 AM
I also asked why OPNsense received a higher CVSS score than pfSense for essentially equivalent bugs (a GUI user with limited privileges being able to have root RCE). Claude's answer was interesting:

The difference comes from how each CVE was scored, not from the bugs themselves. Two scorer choices explain it, and the CVSS version used makes the gap look larger or smaller.

1. Privileges Required

2. Scope Changed (CVSS 3.1 only)

3. CVSS versions
9.9 is a CVSS 3.1 score; 8.6 is CVSS 4.0, so the two can't be compared directly. The versions use different formulas. CVSS 3.1 is arithmetic: PR:H costs 1.6 points against PR:L, and S:C adds 1.1. CVSS 4.0 puts vectors into equivalence groups and looks up a score per group. AV:N/PR:H/UI:N and AV:N/PR:L/UI:N land in the same group, so PR:H costs only 0.1, and impact on other systems adds less than Scope did. CVSS 4.0 therefore scores admin-only bugs higher than 3.1 does, and the top end lower:

Vector choiceCVSS 3.1CVSS 4.0
PR:H, no scope change / no subsequent impact (pfSense as scored)7.28.6
PR:L, no scope change / no subsequent impact8.88.7
PR:L, S:C / SC:H SI:H SA:H (OPNsense GeoIP CVE-2026-57155 as scored)9.99.4

Bold = published score: pfSense 7.2 (CVE records for SA-26_23 to 26_26) and 8.6 (VulnCheck), GeoIP 9.9 (GitHub CNA; no CVSS 4.0 score published). Other values computed from the same vectors with the Python cvss library.

Compared on the same version, the gap is 2.7 points in CVSS 3.1 (7.2 against 9.9) but only 0.8 in CVSS 4.0 (8.6 against 9.4). The scorer choices in points 1 and 2 cause the difference; CVSS 3.1 amplifies them much more than 4.0 does.

If anything, the GeoIP bug is harder to exploit than a direct command injection. It needs a path-traversal file write, then a planted newsyslog fragment, then waiting for the hourly root cron job. It was still scored AC:L.
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 21, 2026, 11:27:36 AM
And most importantly, if pfSense were scored on the same privilege basis as the GeoIP CVE (PR:L plus scope change), its eight root RCEs would score exactly what GeoIP got: 9.9 in CVSS 3.1, 9.4 in CVSS 4.0. On the same metrics there is no difference.

pfSense groupAs published (PR:H)PR:L onlyPR:L + scope change (GeoIP basis)
Root RCEs (SA-26_23, 24, 25, 26, 30, 31, 32, 37)3.1: 7.2 / 4.0: 8.63.1: 8.8 / 4.0: 8.73.1: 9.9 / 4.0: 9.4
Root RCEs (SA-26_29 time zone, SA-26_38 PPPoE)3.1: 6.6 / 4.0: 7.53.1: 7.5 / 4.0: 7.73.1: 8.5 / 4.0: 9.0
Local file read (SA-26_33)3.1: 4.9 / 4.0: 6.93.1: 6.5 / 4.0: 7.13.1: 7.7 / 4.0: 8.5

Bold = published score: 4.0 from VulnCheck; 3.1 7.2 from the CVE records for SA-26_23 to 26_26 only. Other values computed with the Python cvss library. For the 3.1 column of the last two rows, 4.0's AC:H/AT:P was mapped to 3.1's AC:H.

SA-26_29 and SA-26_38 stay lower because VulnCheck scored them AC:H/AT:P (harder to exploit). The GeoIP chain was scored AC:L.
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 21, 2026, 11:29:55 AM
Looks like pfSense benefits from having a more lenient CNA...
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 21, 2026, 11:48:35 AM
The final bit of analysis that really interested me. It's probably pseudo-scientific, and no doubt there were bugs introduced into OPNsense (that have been patched or are still to be discovered) that pfSense hasn't had, but still.

Of the 19 bugs pfSense fixed on 17 Nov 2026, OPNsense inherited the vulnerable code for 11 when it forked in late 2014. All 11 were fixed or removed before pfSense's release. Four were fixed in 2026, two of them through OPNsense CVEs; the rest went 1 to 11 years earlier. The other 8 bugs are in code OPNsense never had.

pfSense SA (CVSS)IssueOPNsenseFixed / removed inAhead of pfSense
26_23 (8.6)QinQ command execInherited (unescaped ngctl call on deletion)Legacy QinQ removed, 18.7 (2018-07-28)8.3 y
26_24 (8.6)CARP VHID command execInheritedexec replaced by interface details, 21.7.3 (2021-09-21)5.2 y
26_25 (8.6)Limiter number command execNo equivalent: pfSense's 2022 dnctl code; OPNsense's shaper is its own MVC code--
26_26 (8.6)IPsec login banner → strongswan.confInheritedValue quoted, 25.7 (2025-07-21); newlines blocked, 26.1.11 (2026-06-29), CVE-2026-571541.3 y / 4.6 mo
26_30 (8.6)sshguard settings command execNo equivalent: OPNsense has no sshguard--
26_31 (8.6)Wireless parent interface command execInherited, same unescaped execmwexecf hardening, 26.1 (2026-01-28), no advisory9.7 mo
26_32 (8.6)Gateway monitor IP command execNot vulnerable: dpinger arrived in 18.7 with the monitor IP already escaped--
26_37 (8.6)PPP periodic reset crontabInheritedFeature removed, 16.7 (2016-07-26)10.3 y
26_35 (7.7)OpenVPN username → pfctlNo equivalent: OPNsense's scripts never put usernames into shell commands--
26_29 (7.5)Time zone → php.iniInherited; still unvalidated after the 2017 move to a templateValidated, 26.1.11 (2026-06-29), CVE-2026-571544.6 mo
26_38 (7.5)PPPoE server username → mpd.secretInheritedMoved to a plugin in 16.7; plugin removed in 20.7 (2020-07-28)16.3 y
26_33 (6.9)DynDNS custom URL file readInherited; os-dyndns plugin from 17.7, no protocol restrictionPlugin removed, 23.7 (2023-07-28)23.3 y
26_40 (5.1)Unbound ACL name injectionInherited; the 23.7 MVC migration kept it injectableFixed, 26.1.11 (2026-06-29), CVE-2026-571544.6 mo
26_41 (5.1)Unbound sock_queue_timeoutNo equivalent setting--
26_39 (4.8)Separator color XSSNo equivalent: OPNsense has no rule separators--
26_28 (2.3)firewall_rules.php reflected XSSNo equivalent option--
26_36 (2.3)OpenVPN learn-address CNNo equivalent: OPNsense's handler passes no CN to a shell--
26_27 (none)Privilege bypass via pkg.phpInheritedpkg.php and pkg_edit.php removed, 15.1.8 (2015-03-25)11.7 y
26_34 (none)DHCP client hostname command execInheritedFixed, 26.1.8 (2026-05-12), CVE-2026-45158, rated critical6.2 mo

1 OPNsense's PPP client username had the same class of bug in mpd config. It was fixed in 26.1.11 under CVE-2026-57154.
2 Not checked whether os-dyndns logged the response, which is what makes the pfSense bug readable.

CVE-2026-57154 is GHSA-fq94-cxvc-9r7w (https://github.com/opnsense/core/security/advisories/GHSA-fq94-cxvc-9r7w): line injection through many GUI text fields, rated 8.1. CVE-2026-45158 is GHSA-5rx3-w735-74wm (https://github.com/opnsense/core/security/advisories/GHSA-5rx3-w735-74wm). OPNsense also fixed a login-protection bug in 26.1.11, CVE-2026-63442: CR/LF in a login username lets an attacker get arbitrary IPs blocked. It is not equivalent to pfSense's sshguard bug.

"Inherited" means the same unescaped code was there at the fork. Exploitability on OPNsense was not tested, except where an OPNsense advisory confirms it.

Method: each bug traced in opnsense-core from the fork commit (2014-10-27) to 2026-11-18, and in opnsense-plugins for dyndns and PPPoE. Releases mapped by content in the stable tags, or by the advisory's patched versions. "Ahead of pfSense" is measured to 2026-11-17.
Title: Re: netgate freebsd performance patch
Post by: Greelan on November 21, 2026, 11:55:14 AM
That last bug is so insightful.

It's one of the critical bugs that the pfSense forum post makes so much of, to "demonstrate" that OPNsense is so much more vulnerable than pfSense. But pfSense had the same bug, and took 6 more months to patch it! And conveniently when patching it, didn't have a CVE assigned and hence no CVSS rating.
Title: Re: netgate freebsd performance patch
Post by: franco on November 21, 2026, 10:45:42 PM
Thanks for crunching these numbers.  It's interesting and largely what we've already mentioned or what was clear from internal discussions with researchers and reporters of recent advisories.

Maybe two points need to be stressed:

1. We do the scoring with the reporter.  I personally hate how CVSS treats the problem scope of "network device with a network-reachable GUI with fine grained administration privileges".  This fits a large portion of network appliances.  And the scoring for these types of devices is always much higher compared to other devices or software due to the way CVSS is modelled.  It also gives no leeway for saying the administrator would never try to exploit this, because impact is not part of the scoring.

2. Yes we clean up bugs and security fix issues.  Yes we likely also have not issued a lot of these as security advisories, but we've done regular audits on our code and pfsense code before probably since 2013.  This trend will continue.  :)


Cheers,
Franco