netgate freebsd performance patch

Started by Lucid1010, October 09, 2026, 12:00:52 PM

Previous topic - Next topic
Today at 11:12:46 AM #15 Last Edit: Today at 11:25:01 AM by Greelan
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
  • OPNsense's GeoIP CVE (CVE-2026-57155) is scored PR:L, because the attacker needs only the "Firewall Alias Edit" privilege.
  • VulnCheck scored the pfSense CVEs PR:H, meaning it assumed an admin-level attacker.
  • pfSense also has per-page privileges, though. A user granted only the QinQ, Limiter or Virtual IP edit page reaches root the same way. Scored consistently, those would be PR:L too.

2. Scope Changed (CVSS 3.1 only)
  • The GeoIP vector is CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H.
  • S:C treats escaping from a restricted GUI user to root on the OS as crossing a security boundary. That one choice adds 1.1 to the score.
  • The four pfSense CVE records that carry a CVSS 3.1 score (SA-26_23 to 26_26) use S:U.

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.

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.

Looks like pfSense benefits from having a more lenient CNA...

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: line injection through many GUI text fields, rated 8.1. CVE-2026-45158 is 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.

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.