Commit Graph

14 Commits

Author SHA1 Message Date
Soumya Sambu
d83cb2d0e5 libgit2: Fix CVE-2024-24575 and CVE-2024-24577
CVE-2024-24575:
libgit2 is a portable C implementation of the Git core methods provided
as a linkable library with a solid API, allowing to build Git functionality
into your application. Using well-crafted inputs to `git_revparse_single`
can cause the function to enter an infinite loop, potentially causing a
Denial of Service attack in the calling application. The revparse function
in `src/libgit2/revparse.c` uses a loop to parse the user-provided spec
string. There is an edge-case during parsing that allows a bad actor to
force the loop conditions to access arbitrary memory. Potentially, this
could also leak memory if the extracted rev spec is reflected back to the
attacker. As such, libgit2 versions before 1.4.0 are not affected. Users
should upgrade to version 1.6.5 or 1.7.2.

CVE-2024-24577:
libgit2 is a portable C implementation of the Git core methods provided
as a linkable library with a solid API, allowing to build Git functionality
into your application. Using well-crafted inputs to `git_index_add` can
cause heap corruption that could be leveraged for arbitrary code execution.
There is an issue in the `has_dir_name` function in `src/libgit2/index.c`,
which frees an entry that should not be freed. The freed entry is later
used and overwritten with potentially bad actor-controlled data leading to
controlled heap corruption. Depending on the application that uses libgit2,
this could lead to arbitrary code execution. This issue has been patched
in version 1.6.5 and 1.7.2.

References:
https://nvd.nist.gov/vuln/detail/CVE-2024-24575
https://security-tracker.debian.org/tracker/CVE-2024-24575
https://nvd.nist.gov/vuln/detail/CVE-2024-24577
https://security-tracker.debian.org/tracker/CVE-2024-24577

(From OE-Core rev: 942254eb3ef29c8672a35015c086721c4fbe5a4f)

Signed-off-by: Soumya Sambu <soumya.sambu@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-02-15 03:51:57 -10:00
Steve Sakoman
95d0e4347b libgit2: upgrade 1.4.4 -> 1.4.5
Fixes:

libgit2, when compiled using the optional, included libssh2 backend, fails to verify SSH keys by default.

Description
When using an SSH remote with the optional, included libssh2 backend, libgit2 does not perform certificate checking by default. Prior versions of libgit2 require the caller to set the certificate_check field of libgit2's git_remote_callbacks structure - if a certificate check callback is not set, libgit2 does not perform any certificate checking. This means that by default - without configuring a certificate check callback, clients will not perform validation on the server SSH keys and may be subject to a man-in-the-middle attack.

Beginning in libgit2 v1.4.5 and v1.5.1, libgit2 will now perform host key checking by default. Users can still override the default behavior using the certificate_check function.

The libgit2 security team would like to thank the Julia and Rust security teams for responsibly disclosing this vulnerability and assisting with fixing the vulnerability.

(From OE-Core rev: 6c64dc88b5dac910f3760e9cd1003cc83df3ffad)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-24 16:41:46 +00:00
Steve Sakoman
b1d0c4f16e libgit2: uprade 1.4.3 -> 1.4.4
This is a security release with multiple changes.

This provides compatibility with git's changes to address CVE 2022-29187. As a follow up to CVE 2022-24765, now not only is the working directory of a non-bare repository examined for its ownership, but the .git directory and the .git file (if present) are also examined for their ownership.

A fix for compatibility with git's (new) behavior for CVE 2022-24765 allows users on POSIX systems to access a git repository that is owned by them when they are running in sudo.

A fix for further compatibility with git's (existing) behavior for CVE 2022-24765 allows users on Windows to access a git repository that is owned by the Administrator when running with escalated privileges (using runas Administrator).

The bundled zlib is updated to v1.2.12, as prior versions had memory corruption bugs. It is not known that there is a security vulnerability in libgit2 based on these bugs, but we are updating to be cautious.

(From OE-Core rev: 4bc31ac89eb0562bae37e2246e8001b4286f61da)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-24 16:41:46 +00:00
wangmy
1d045cfddf libgit2: upgrade 1.4.2 -> 1.4.3
Changelog:
=========
Validate repository directory ownership (v1.4)
midx: Fix an undefined behavior (left-shift signed overflow)
fetch: support OID refspec without dst
Fix crash when regenerating a patch with unquoted spaces in filename

(From OE-Core rev: e6541bd09289abc87b7e81716bea774c80285bc0)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit bef09c61ee32df214fb8cf6000e0314ff3a38156)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-28 17:07:18 +01:00
wangmy
e1dea39862 libgit2: upgrade 1.4.1 -> 1.4.2
This is a bugfix release with the following changes:
====================================================
remote: do store the update_tips callback error value
win32: find_system_dirs does not return GIT_ENOTFOUND

(From OE-Core rev: c8f1727fd3f9583e25ac4dab0194b508758d7eaa)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02 18:43:24 +00:00
Khem Raj
995b971744 libgit2: Upgrade to 1.4.1
this is bugfix release
https://github.com/libgit2/libgit2/releases/tag/v1.4.1

(From OE-Core rev: ee862994d27d1a82642309b84e5957e4a7d341e3)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Alexander Kanavin
09da07b203 libgit2: update 1.3.0 -> 1.4.0
License-Update: regex replaced with pcre, overall licensing doesn't change

(From OE-Core rev: 1887c33733578c36d064bf91068b51b241fe88c0)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-18 11:37:11 +00:00
Richard Purdie
ba2f6c64a1 recipes: Update github.com urls to use https
Github has announced there will be no more git:// fetching from their servers:

https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git

and they're about to start having brownout periods to encourage people
to update. This runs the conversion script over OE-Core to update our
urls to use https instead of git.

(From OE-Core rev: b37b61e9a1e448a34957db9ae39285d21352552e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-03 10:12:42 +00:00
Alexander Kanavin
98de468054 libgit2: update 1.2.0 -> 1.3.0
(From OE-Core rev: d8735cacb0e573ac91c3aee3e3e573d804646c63)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-23 17:42:25 +01:00
Alexander Kanavin
8bddba7249 libgit2: update 1.1.1 -> 1.2.0
License-Update: includes portions of openssl headers
0903cac1d0

(From OE-Core rev: 81a101332e7e59848165b06b734056a385e8cc3f)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-11 18:41:38 +01:00
Alexander Kanavin
a51c307509 libgit2: upgrade 1.1.0 -> 1.1.1
(From OE-Core rev: cb5734550778a37c0140f63d337fc72168836bb9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-16 21:23:44 +01:00
Randy MacLeod
53f26a4587 libgit2: pull in updates from meta-oe
d62613046 libgit2: update to 1.1.0
ce47a064d libgit2: upgrade 1.0.0 -> 1.0.1
7d137c5b2 libgit2: Enable pcre2 regexp backend
14894a4c4 libgit2: Update to v1.0.0
7b39ea059 libgit2: Upgrade to 0.28.4
da358cf1f libgit2: Don't pass parameters with their default values to cmake
bcd89f7cd libgit2: Upgrade 0.27.9 -> 0.28.3
87c9da253 libgit2: Upgrade 0.27.8 -> 0.27.9

(From OE-Core rev: 41704717860c96ba91e19853e77df1f8100ed2ea)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26 15:21:20 +00:00
Randy MacLeod
53615dae3e Add libgit2, libssh2 from meta-oe for rust
(From OE-Core rev: a6e49314f64b65b3a165d33ae581b6761ded0e82)

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-26 15:21:20 +00:00