Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    23.05 Suricata Update pfSense php crash

    Scheduled Pinned Locked Moved Official Netgate® Hardware
    8 Posts 3 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mrsunfire
      last edited by mrsunfire

      After all the php crashes with 23.01 I now get another one with 23.05 every time suricata is updating.

      Crash report begins.  Anonymous machine information:
      
      amd64
      14.0-CURRENT
      FreeBSD 14.0-CURRENT #1 plus-RELENG_23_05-n256102-7cd3d043045: Mon May 22 15:33:52 UTC 2023     root@freebsd:/var/jenkins/workspace/pfSense-Plus-snapshots-23_05-main/obj/amd64/LkEyii3W/var/jenkins/workspace/pfSense-Plus-snapshots-23_05-main/sources/FreeBS
      
      Crash report details:
      
      PHP Errors:
      [14-Jun-2023 01:00:58 Europe/Berlin] PHP Fatal error:  Uncaught ValueError: gettext(): Argument #1 ($message) is too long in /usr/local/pkg/suricata/suricata_check_for_rule_updates.php:820
      Stack trace:
      #0 /usr/local/pkg/suricata/suricata_check_for_rule_updates.php(820): gettext('- Snort rules: ...')
      #1 {main}
        thrown in /usr/local/pkg/suricata/suricata_check_for_rule_updates.php on line 820
      
      
      
      No FreeBSD crash data found.
      			
      

      Netgate 6100 MAX

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        Are you running the current Suricata package? Interesting, I don't see any other reports of that error....

        bmeeksB 1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Opened https://redmine.pfsense.org/issues/14475 to track it.

          1 Reply Last reply Reply Quote 0
          • bmeeksB
            bmeeks @stephenw10
            last edited by bmeeks

            @stephenw10 said in 23.05 Suricata Update pfSense php crash:

            Interesting, I don't see any other reports of that error....

            This is GUI code that was contributed by Viktor Gurov when he worked for Netgate. It is part of the logic that allows the addition of multiple custom rules package files to the list for automatic downloading and updating.

            @mrsunfire, please share your list of custom rule archives configured on the GLOBAL SETTINGS tab. Is your firewall locale (language) set for English or perhaps some other language?

            The specific error is happening within a gettext() PHP function call which typically attempts to translate from one language to another.

            M 1 Reply Last reply Reply Quote 1
            • M
              mrsunfire @bmeeks
              last edited by mrsunfire

              @bmeeks It's english of course :) Here are my custom rules:

              a177e089-4f60-42c5-af25-1463b3c69b90-image.png

              I cloud fix the issue by changing the Snort Rules Filename to that what is shown in the screenshot. Before that I had it set to snortrules-snapshot-29200.tar.gz. With that it was crashing!

              @stephenw10 I'm running Suricata 6.0.12, yes.

              Netgate 6100 MAX

              bmeeksB 1 Reply Last reply Reply Quote 0
              • bmeeksB
                bmeeks @mrsunfire
                last edited by

                @mrsunfire said in 23.05 Suricata Update pfSense php crash:

                I cloud fix the issue by changing the Snort Rules Filename to that what is shown in the screenshot. Before that I had it set to snortrules-snapshot-29200.tar.gz. With that it was crashing!

                That is really puzzling as both filenames are the exact same length. Is it possible that the old filename had some extra whitespace tacked onto the end that made it longer? You would not have seen the extra spaces on the screen, so everything would look fine.

                I asked about the language due to the time zone shown in the error message (Europe/Berlin). But that might just be pfSense defaults for debugging errors.

                M 1 Reply Last reply Reply Quote 0
                • M
                  mrsunfire @bmeeks
                  last edited by

                  @bmeeks I'm located in Germany so that's the reason for that timezone. But I do always use English for networking stuff.

                  Netgate 6100 MAX

                  bmeeksB 1 Reply Last reply Reply Quote 0
                  • bmeeksB
                    bmeeks @mrsunfire
                    last edited by bmeeks

                    @mrsunfire:
                    I've identified the source of this error. The original author of the section of code that performs remote notifications of newly added rules categories was apparently unaware that the PHP gettext() function has an input string limit of 4096 characters. In his defense, neither was I aware of that limit until some research clued me in 😊

                    I have a fix that will be coming with the next Suricata package update. I hope to have that posted in the next couple of days or so for the Netgate team to review and approve.

                    1 Reply Last reply Reply Quote 2
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.