Repository navigation
fix(deps): update rust crate git2 to 0.20.0 [security] - #698
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Contributor
Author
|
renovate
Bot
force-pushed
the
renovate/crate-git2-vulnerability
branch
from
September 2, 2026 23:46
b40a999 to
b679f13
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.19.0→0.20.0git2 has potential undefined behavior when dereferencing Buf struct
GHSA-j39j-6gw9-jw6h
More information
Details
If the Buf struct is dereferenced immediately after calling new() or default() on the Buf struct, a null pointer is passed to the unsafe function slice::from_raw_parts. According to the safety section documentation of the function, data must be non-null and aligned even for zero-length slices or slices of ZSTs. Thus, passing a null pointer will lead to undefined behavior.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:UReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
rust-lang/git2-rs (git2)
v0.20.4Compare Source
0.20.4...main
Added
unstable-sha256Cargo feature,along with
*_extAPI variants that accept anObjectFormat.#1206
opts::set_cache_max_size()andopts::get_cached_memory().#1188
Repository::object_format()and a newObjectFormatenum.#1204
Repository::set_config().#1208
merge_file()along withMergeFileInput.#1210
Repository::refdb_compress()for packing loose refs.#1221
Refdbtype, along withRepository::refdb()andRepository::set_refdb().Repository::refdb_compress()now delegates toRefdb::compress().#1228
Revspec::into_objects().#1230
BlameHunk::final_committer(),BlameHunk::orig_committer(),BlameHunk::summary(), andBlameHunk::summary_bytes().#1231
CloneforReference.#1233
Repository::author_from_env()andRepository::committer_from_env().#1237
impl From<Utf8Error> for Error.#1239
Changed
ssh,https, andcredCargo features are no longer enabled by default.Previously
default = ["ssh", "https"]; nowdefault = [].Enable them explicitly if you rely on credential helpers or transport support.
#1168
CredentialHelperand theurldependency are now gated behind the newcredCargo feature.Enabling
sshorhttpstransitively enablescred.#1168
#1173
Option<&str>now return
Result<&str, Error>orResult<Option<&str>, Error>,so callers can distinguish a missing value from a non-UTF-8 one.
#1241
BlameHunk::final_signature,BlameHunk::final_committer,BlameHunk::orig_signature, andBlameHunk::orig_committernow return
Optionto avoid segfaults when signature information is missing.#1254
#1242
Fixed
MergeOptions::skip_reuc()to use the correctGIT_MERGE_SKIP_REUCflag.#1194
Repository::submodules()now returns anErrorwhen the underlyinggit_submodule_lookup()call to libgit2 fails, rather than panicking with a failed assertion.#1220
Reference::is_valid_name()now propagates errors fromCStringconversion instead of panicking.#1229
Remote::list()to return an empty list instead of erroringwhen the remote advertises no refs.
#1250
ReferenceNamesnow returns anErrfor non-UTF-8 branch names instead of panicking.#1239
Documentation
git_checkout_head.#1149
IndexAddOptionflags.#1163
sshfeature.#1187
Repository::tag_foreach().#1190
StatusOptions.#1199
#1219
Signature::from_raw_const()docs.#1222
#1223
#1224
CheckoutBuilder::update_index()documentation.#1232
#1235
Repository::stash_save_ext()docs.#1245
#1243
CheckoutBuilder::refresh()docs.#1252
Internals
civet/conduitfrom dev-dependencies.#1170
#1171
#1177
#1182
#1196
#1198
timefrom 0.3.41 to 0.3.47.#1215
#1244
#1246
Repository::statuses().#1251
#1201
#1205
v0.20.3Compare Source
0.20.3...0.20.4
Fixed
Buf.#1213
v0.20.2Compare Source
0.20.2...0.20.3
Changed
#1197
v0.20.1Compare Source
0.20.1...0.20.2
Added
Status::WT_UNREADABLE.#1151
Fixed
GIT_EDIRECTORY,GIT_EMERGECONFLICT,GIT_EUNCHANGED,GIT_ENOTSUPPORTED, andGIT_EREADONLYtoError::raw_code.#1153
Indexer::new.#1160
v0.20.0Compare Source
0.20.0...0.20.1
Added
Repository::branch_upstream_merge()#1131
Index::conflict_get()#1134
Index::conflict_remove()#1133
opts::set_cache_object_limit()#1118
Repo::merge_file_from_index()and associatedMergeFileOptionsandMergeFileResult.#1062
Changed
urldependency minimum raised to 2.5.4#1128
#1121
CredentialHelper::config) now checks for helpers that start with something that looks like an absolute path, rather than checking for a/or\anywhere in the helper string (which resolves an issue if the helper had arguments with/or\).#1137
Fixed
Remote::url_bytesif the url is empty.#1120
Patch::delta,Patch::hunk, andPatch::line_in_hunk. The return values must not outlive thePatch.#1141
#1143
Configuration
📅 Schedule: (in timezone Etc/GMT)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.