Package: php8.2-fpm
Version: 8.2.12-1

When php8.2-fpm tries to handle a POST request with too many input
variables, it dies by a SIGSEGV.

The content of /var/log/php8.2-fpm.log is:

    [08-Jan-2024 14:18:06] NOTICE: fpm is running, pid 8642
    [08-Jan-2024 14:18:06] NOTICE: ready to handle connections
    [08-Jan-2024 14:18:06] NOTICE: systemd monitor interval set to 10000ms
    [08-Jan-2024 14:18:17] WARNING: [pool www] child 8645 exited on signal 11 
(SIGSEGV - core dumped) after 10.785268 seconds from start
    [08-Jan-2024 14:18:17] NOTICE: [pool www] child 8685 started

The error message from the core dump is:

    [New LWP 8645]
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    Core was generated by `php-fpm: pool www                                    
                        '.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007fb6da07b2df in register_compiled_variables ()
        at ./build-8.2/src/debugger/debugger.c:103
    103 ./build-8.2/src/debugger/debugger.c: Datei oder Verzeichnis nicht 
gefunden. (File or directory not found.)

Here is the backtrace:

    #0  0x00007fb6da07b2df in register_compiled_variables ()
        at ./build-8.2/src/debugger/debugger.c:103
    #1  0x00007fb6da07bcba in xdebug_debugger_error_cb (
        error_filename=error_filename@entry=0x55e6834023f0, 
error_lineno=error_lineno@entry=0,
        type=type@entry=2, error_type_str=error_type_str@entry=0x55e68313c380 
"Warning",
        buffer=0x7fb6d7aa6e78 "PHP Request Startup: Input variables exceeded 1000. 
To increase the limit change max_input_vars in php.ini.") at 
./build-8.2/src/debugger/debugger.c:432
    #2  0x00007fb6da08a239 in xdebug_develop_error_cb (orig_type=2,
        error_filename=<optimized out>, error_lineno=0, message=<optimized out>)
        at ./build-8.2/src/develop/stack.c:800
    #3  0x000055e680b04d82 in zend_error_zstr_at ()
    #4  0x000055e680b004db in php_verror ()
    #5  0x000055e680b0061b in php_error_docref ()
    #6  0x000055e680b00e2d in ?? ()
    #7  0x000055e680c92347 in sapi_handle_post ()
    #8  0x000055e680c9871b in php_default_treat_data ()
    #9  0x000055e680c9723c in ?? ()
    #10 0x000055e680cccb6f in zend_activate_auto_globals ()
    #11 0x000055e680c99202 in php_hash_environment ()
    #12 0x000055e680c898e8 in php_request_startup ()
    #13 0x000055e680b237aa in ?? ()
    #14 0x00007fb6da3eb6ca in __libc_start_call_main 
(main=main@entry=0x55e680b22ac0,
        argc=argc@entry=4, argv=argv@entry=0x7ffd0f4f2368)
        at ../sysdeps/nptl/libc_start_call_main.h:58
    #15 0x00007fb6da3eb785 in __libc_start_main_impl (main=0x55e680b22ac0, 
argc=4,
        argv=0x7ffd0f4f2368, init=<optimized out>, fini=<optimized out>,
        rtld_fini=<optimized out>, stack_end=0x7ffd0f4f2358) at 
../csu/libc-start.c:360
    #16 0x000055e680b25721 in _start ()

If I increase max_input_vars so that the error message is not triggered,
PHP runs fine. Also, if I disable the PHP xdebug extension, the error
for exceeding the input variables is logged just fine and the PHP
process does not die. I have php8.2-xdebug at version
3.2.0+3.1.6+2.9.8+2.8.1+2.5.5-3.

Best regards
Lukas

Reply via email to