-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Comparing changes
Open a pull request
base repository: libgit2/libgit2
base: v1.9.1
head repository: libgit2/libgit2
compare: v1.9.2
- 14 commits
- 22 files changed
- 3 contributors
Commits on Dec 1, 2025
-
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.
Configuration menu - View commit details
-
Copy full SHA for 91ebc49 - Browse repository at this point
Copy the full SHA 91ebc49View commit details -
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)
Configuration menu - View commit details
-
Copy full SHA for d8b452f - Browse repository at this point
Copy the full SHA d8b452fView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 47dfe7f - Browse repository at this point
Copy the full SHA 47dfe7fView commit details -
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`.
Configuration menu - View commit details
-
Copy full SHA for c1a7d12 - Browse repository at this point
Copy the full SHA c1a7d12View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for e0ef2c1 - Browse repository at this point
Copy the full SHA e0ef2c1View commit details -
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`.)
Configuration menu - View commit details
-
Copy full SHA for 6f3614c - Browse repository at this point
Copy the full SHA 6f3614cView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for fa19ed2 - Browse repository at this point
Copy the full SHA fa19ed2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0618182 - Browse repository at this point
Copy the full SHA 0618182View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for d0723d2 - Browse repository at this point
Copy the full SHA d0723d2View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 346f28b - Browse repository at this point
Copy the full SHA 346f28bView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for a18f214 - Browse repository at this point
Copy the full SHA a18f214View commit details -
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`.
Configuration menu - View commit details
-
Copy full SHA for 069c905 - Browse repository at this point
Copy the full SHA 069c905View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 1b07eec - Browse repository at this point
Copy the full SHA 1b07eecView commit details
Commits on Dec 2, 2025
-
Configuration menu - View commit details
-
Copy full SHA for ca22574 - Browse repository at this point
Copy the full SHA ca22574View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v1.9.1...v1.9.2