XG-2758 - memory allocation issue in csrf-magic.php



  • Hi all,

    I have recently updated my XG-2758 pfsense firewall from version 2.3.1 to 2.4.3 (latest stable). Upgrade went fine, firewall came up and all is happy. Over the weekend the system detected a crash however, which noted that the /usr/local/www/csrf/csrf-magic.php had a memory allocation failure.

    [16-Apr-2018 12:12:39 Australia/Sydney] PHP Fatal error:  Allowed memory size of 536870912 bytes exhausted (tried to allocate 251478591 bytes) in /usr/local/www/csrf/csrf-magic.php on line 159
    [16-Apr-2018 12:12:39 Australia/Sydney] PHP Stack trace:
    [16-Apr-2018 12:12:39 Australia/Sydney] PHP   1\. csrf_ob_handler() /usr/local/www/csrf/csrf-magic.php:0
    [16-Apr-2018 12:12:39 Australia/Sydney] PHP   2\. preg_replace() /usr/local/www/csrf/csrf-magic.php:159
    

    Its only happened once so far, but I would like to know if the max memory allocation is tunable for this table. Or if I should look at something else.

    I should also add that I had to recently up the amount of Firewall maximum entries from 200k to 250k. Although now the system is on 2.4.3 this seems to be the default. Not sure if they are related in anyway.