Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: php/php-src
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: php-8.1.29
Choose a base ref
...
head repository: php/php-src
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: php-8.1.30
Choose a head ref
  • 13 commits
  • 18 files changed
  • 5 contributors

Commits on Jun 5, 2024

  1. Fix GHSA-9fcc-425m-g385: bypass CVE-2024-1874

    The old code checked for suffixes but didn't take into account trailing
    whitespace. Furthermore, there is peculiar behaviour with trailing dots
    too. This all happens because of the special path-handling code inside
    CreateProcessW.
    
    By studying Wine's code, we can see that CreateProcessInternalW calls
    get_file_name [1] in our case because we haven't provided an application
    name. That code gets the first whitespace-delimited string into app_name
    excluding the quotes. It's then passed to create_process_params [2]
    where there is the path handling code that transforms the command line
    argument to an image path [3]. Inside Wine, the extension check if
    performed after these transformations [4]. By doing the same thing in
    PHP we match the behaviour and can properly match the extension even in
    the given edge cases.
    
    [1] https://github.com/wine-mirror/wine/blob/166895ae3ad3890ad946a309d0fd85e89ea3630e/dlls/kernelbase/process.c#L542-L543
    [2] https://github.com/wine-mirror/wine/blob/166895ae3ad3890ad946a309d0fd85e89ea3630e/dlls/kernelbase/process.c#L565
    [3] https://github.com/wine-mirror/wine/blob/166895ae3ad3890ad946a309d0fd85e89ea3630e/dlls/kernelbase/process.c#L150-L151
    [4] https://github.com/wine-mirror/wine/blob/166895ae3ad3890ad946a309d0fd85e89ea3630e/dlls/kernelbase/process.c#L647-L654
    nielsdos authored and ramsey committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    4b15f5d View commit details
    Browse the repository at this point in the history
  2. Fix GHSA-3qgc-jrrr-25jv

    The original code is error-prone due to the "best fit mapping" that
    happens with the argument parsing but not with the query string.
    When we get a non-ASCII character, try to remap it and see if it becomes
    a hyphen.
    
    An alternative approach is to create a custom main `wmain` receiving
    wide-character variations that does the ANSI transformation with the
    best-fit mapping, but that's more error-prone and could cause unexpected
    breakage.
    
    Another alternative was just don't doing this check altogether and
    always check for `cgi || fastcgi` instead, but that breaks real-world
    use-cases.
    nielsdos authored and ramsey committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    9382673 View commit details
    Browse the repository at this point in the history
  3. Fix GHSA-w8qr-v226-r27w

    We should not early-out with success status if we found an ipv6
    hostname, we should keep checking the rest of the conditions.
    Because integrating the if-check of the ipv6 hostname in the
    "Validate domain" if-check made the code hard to read, I extracted the
    condition out to a separate function. This also required to make
    a few pointers const in order to have some clean code.
    nielsdos authored and ramsey committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    7e0e3cc View commit details
    Browse the repository at this point in the history
  4. Update NEWS

    Co-authored-by: Eric Mann <[email protected]>
    ramsey and ericmann committed Jun 5, 2024
    Configuration menu
    Copy the full SHA
    557e09f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a87ccc7 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Fix GHSA-9pqp-7h25-4f32

    multipart/form-data boundaries larger than the read buffer result in erroneous
    parsing, which violates data integrity.
    
    Limit boundary size, as allowed by RFC 1521:
    
        Encapsulation boundaries [...] must be no longer than 70 characters, not
        counting the two leading hyphens.
    
    We correctly parse payloads with boundaries of length up to
    FILLUNIT-strlen("\r\n--") bytes, so allow this for BC.
    arnaud-lb authored and bukka committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    d65a1e6 View commit details
    Browse the repository at this point in the history
  2. Fix GHSA-p99j-rfp4-xqvq

    It's no use trying to work around whatever the operating system and Apache
    do because we'll be fighting that until eternity.
    Change the skip_getopt condition such that when we're running in
    CGI or FastCGI mode we always skip the argument parsing.
    This is a BC break, but this seems to be the only way to get rid of this
    class of issues.
    nielsdos authored and bukka committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    4b9cd27 View commit details
    Browse the repository at this point in the history
  3. Fix GHSA-94p6-54jq-9mwp

    Apache only generates REDIRECT_STATUS, so explicitly check for that
    if the server name is Apache, don't allow other variable names.
    Furthermore, redirect.so and Netscape no longer exist, so
    remove those entries as we can't check their server name anymore.
    
    We now also check for the configuration override *first* such that it
    always take precedence. This would allow for a mitigation path if
    something like this happens in the future.
    nielsdos authored and bukka committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    c1c14c8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4580b8b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8d87bc3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4bcc7d5 View commit details
    Browse the repository at this point in the history
  7. [skip ci] Fix typo in NEWS

    Co-authored-by: Niels Dossche <[email protected]>
    bukka and nielsdos authored Sep 23, 2024
    Configuration menu
    Copy the full SHA
    d5035a7 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Update versions for PHP 8.1.30

    ramsey committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    773c0ed View commit details
    Browse the repository at this point in the history
Loading