Skip to content

FPM uid and gid overflow #19320

@bukka

Description

@bukka

Description

This was originally reported in the security report but because it requires access to the FPM configuration (which means basically access to start FPM which is often the root user in typical setup), it wasn't considered as a security issue - such users has already permission to do whatever they want.

The supplied UID and GID to be used by PHP-FPM workers are converted from an unsigned
long type, which could be either 64 or 32 bits unsigned integer depending on the platform,
but are stored in a signed 32 bits integer. This could create confusion with the actual used
UID/GID. Also, a bad UID or GID can make repeatedly crash the workers when setting
UID or GID through setuid or setgid function, because the saved UID and GID are not
verified to be valid before forking.

PHP Version

PHP 8.3+

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions