Project

General

Profile

Actions

Bug #13515

closed

pfSense - Feature #13446: Upgrade PHP from 7.4 to 8.1

Snort with PHP 8.1 - TypeError when saving edits to an interface

Added by Bill Meeks about 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Snort
Target version:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Affected Version:
2.7.0
Affected Plus Version:
23.01
Affected Architecture:
All

Description

Testing the Snort package with the September 22, 2022 snapshot of "PHP 8.1 and FreeBSD Main" in a VMware virtual machine.

The following PHP type error is thrown when adding/editing a Snort interface:

amd64
14.0-CURRENT
FreeBSD 14.0-CURRENT #0 devel-main-n255797-d8d104eec65: Thu Sep 22 18:54:16 UTC 2022     root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-master-main/obj/amd64/YVYTCXmQ/var/jenkins/workspace/pfSense-CE-snapshots-master-main/sources/FreeBSD-src-dev

Crash report details:

PHP Errors:
[24-Sep-2022 10:05:24 America/New_York] PHP Fatal error:  Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/snort/snort.inc:4345
Stack trace:
#0 /usr/local/pkg/snort/snort.inc(505): snort_get_vpns_list()
#1 /usr/local/pkg/snort/snort_generate_conf.php(32): snort_build_list(Array, 'default')
#2 /usr/local/pkg/snort/snort.inc(3834): include('/usr/local/pkg/...')
#3 /usr/local/pkg/snort/snort.inc(1023): snort_generate_conf(Array)
#4 /usr/local/www/snort/snort_interfaces_edit.php(522): sync_snort_package_config()
#5 {main}
  thrown in /usr/local/pkg/snort/snort.inc on line 4345

Documenting bug here, and I will also add it to my private TODO list for Snort remediations against PHP 8.1.

Actions #1

Updated by Bill Meeks about 2 years ago

This issue has been resolved in the latest Snort GUI package pull request posted here for review and merge: [https://github.com/pfsense/FreeBSD-ports/pull/1191]. When the Pull Request is merged, this issue can be marked RESOLVED.

Actions #2

Updated by Kris Phillips about 2 years ago

  • Status changed from New to Confirmed

Tested on September 30th builds of CE. Doesn't appear this has been merged as the error is still present.

Actions #3

Updated by Bill Meeks about 2 years ago

The request is being reviewed by Jim Pingle and is not yet merged.

Actions #4

Updated by Jim Pingle about 2 years ago

  • Affected Plus Version changed from 22.11 to 23.01
Actions #5

Updated by Bill Meeks about 2 years ago

This issue has been resolved with the merging of Pull Request 1191 as detailed here: https://github.com/pfsense/FreeBSD-ports/pull/1191.

Actions #6

Updated by Jim Pingle about 2 years ago

  • Status changed from Confirmed to Resolved
Actions #7

Updated by Jim Pingle about 2 years ago

  • Parent task set to #13446
Actions #8

Updated by Jim Pingle about 2 years ago

  • % Done changed from 0 to 100
Actions #10

Updated by Jove Too over 1 year ago

I am still seeing this error in 2.7.0-RELEASE.

22:53:08 Bootup complete
22:53:08 PHP ERROR: Type: 1, File: /usr/local/pkg/snort/snort.inc, Line: 4345, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/pkg/snort/snort.inc:4345
Stack trace:
#0 /usr/local/pkg/snort/snort.inc(505): snort_get_vpns_list()
#1 /usr/local/pkg/snort/snort_generate_conf.php(32): snort_build_list(Array, 'default')
#2 /usr/local/pkg/snort/snort.inc(3834): include('/usr/local/pkg/...')
#3 /usr/local/pkg/snort/snort.inc(1023): snort_generate_conf(Array)
#4 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): sync_snort_package_config()
#5 /etc/inc/pkg-utils.inc(709): eval()
#6 /etc/rc.start_packages(66): sync_package('snort')
#7 {main}
  thrown

Actions

Also available in: Atom PDF