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: libgit2/libgit2
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.9.1
Choose a base ref
...
head repository: libgit2/libgit2
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.9.2
Choose a head ref
  • 14 commits
  • 22 files changed
  • 3 contributors

Commits on Dec 1, 2025

  1. ssh: fix custom ssh heap buffer overflow

    The `ssh_custom_free()` function calls `strlen()` on the `publickey` 
    field, which stores binary data, not a null-terminated string. This 
    causes a heap buffer overflow when the public key data is not 
    null-terminated or contains embedded null bytes.
    
    The `publickey` field stores binary data, as required by the underlying 
    `libssh2_userauth_publickey()` function, which accepts a public key 
    parameter of the type `const unsigned char*`. 
    
    Use the stored `publickey_len` instead of `strlen()` to determine the 
    correct buffer size.
    bakersdozen123 authored and ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    91ebc49 View commit details
    Browse the repository at this point in the history
  2. fs: improved executable-in-path location tests

    Ensure that our `find_executable` behaves as expected:
    
    * When the executable contains a fully- or partially-qualified filename
      component (eg, `foo/bar`) that `PATH` is not searched; these paths are
      relative to the current working directory.
    * An empty segment in `PATH` (on POSIX systems) is treated as the
      current directory; this is for compatibility with Bourne shells.
    * When a file exists in `PATH`, it is actually executable (on POSIX)
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    d8b452f View commit details
    Browse the repository at this point in the history
  3. fs: improve path-in-executable location

    * Do not search `PATH` for fully- or partially-qualified filenames
      (eg, `foo/bar`)
    * Ensure that a file in the `PATH` is executable before returning it
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    47dfe7f View commit details
    Browse the repository at this point in the history
  4. fs: improve executable search on Windows

    Ensure that when we look for an executable on Windows that we add
    executable suffixes (`.exe`, `.cmd`). Without this, we would not support
    looking for (eg) `ssh`, since we actually need to identify a file named
    `ssh.exe` (or `ssh.cmd`) in `PATH`.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    c1a7d12 View commit details
    Browse the repository at this point in the history
  5. process: improved process execution with shell

    By default, `git_process_new` will no longer try to prepare a single
    string to execute with the shell. Instead, by default, arguments remain
    parameterized and the command to execute is located within the `PATH`.
    
    The shell can also still optionally be used (so that additional
    arguments can be included and variables handled appropriately) but this
    is done by keeping arguments parameterized for safety.
    
    This new behavior prevents accidental misuse and potential command-line
    injection.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    e0ef2c1 View commit details
    Browse the repository at this point in the history
  6. process: resolve paths for win32

    When using `git_process_new` on win32, resolve the path to the
    application in the same way that we do on POSIX.
    
    Search `PATH` for command to execute (unless the given executable is
    fully qualified). In addition, better match Windows executable lookup
    behavior itself (allowing the command to be `foo`, and looking for a
    matching `foo.exe` or `foo.cmd`.)
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    6f3614c View commit details
    Browse the repository at this point in the history
  7. ssh_exec: don't use sh for ssh execution

    Construct the arguments for the ssh exec as an explicit array, instead
    of trying to create a command-line for sh. The latter may use user input
    (the remote path) so this may be vulnerable to command injection.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    fa19ed2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0618182 View commit details
    Browse the repository at this point in the history
  9. str: allow escaping with prefix and suffix

    Allow `git_str_puts_escaped` to take an escaping prefix and an escaping
    suffix; this allows for more options, including the ability to better
    support escaping executed paths.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    d0723d2 View commit details
    Browse the repository at this point in the history
  10. ssh_exec: escape remote paths properly

    When sending paths to the remote server, escape them properly.
    Escape them with a single quote, followed by the escaped character,
    followed by another single quote. This prevents misparsing on the
    remote side and potential command injection.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    346f28b View commit details
    Browse the repository at this point in the history
  11. ssh_exec: support GIT_SSH_COMMAND

    Look for the `GIT_SSH_COMMAND` environment variable and prefer it to
    `GIT_SSH`. The `GIT_SSH_COMMAND` will execute via the shell, which is
    useful to provide additional arguments.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    a18f214 View commit details
    Browse the repository at this point in the history
  12. ssh_exec: use GIT_SSH_COMMAND in tests

    We specify additional arguments to the ssh executable; as a result, we
    specify arguments with `GIT_SSH_COMMAND`.
    ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    069c905 View commit details
    Browse the repository at this point in the history
  13. cmake: disable warnings for operands with different enum types

    With a recent upgrade to a newer version of MSVC we now get a bunch of
    warnings when two operands use different enum types. While sensible in
    theory, in practice we have a couple of non-public enums that extend
    public enums, like for example with `GIT_SUBMODULE_STATUS`.
    
    Let's for now disable this warning to unblock our builds. The
    alternative would be to add casts all over the place, but that feels
    rather cumbersome.
    pks-t authored and ethomson committed Dec 1, 2025
    Configuration menu
    Copy the full SHA
    1b07eec View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2025

  1. Configuration menu
    Copy the full SHA
    ca22574 View commit details
    Browse the repository at this point in the history
Loading