Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667860 - <dev-libs/libgit2-{0.26.7,0.27.5]: Multiple vulnerabilities in
Summary: <dev-libs/libgit2-{0.26.7,0.27.5]: Multiple vulnerabilities in
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard: B3 [noglsa]
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-06 06:45 UTC by Michał Górny
Modified: 2019-04-15 22:25 UTC (History)
2 users (show)

See Also:
Package list:
dev-libs/libgit2-0.26.7
Runtime testing required: No
stable-bot: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-10-06 06:45:22 UTC
Yay, another bunch of libgit2 vulnerabilities.  From release notes:

---
Submodule URLs and paths with a leading "-" are now ignored.
This is due to the recently discovered CVE-2018-17456, which
can lead to arbitrary code execution in upstream git. While
libgit2 itself is not vulnerable, it can be used to inject
options in an implementation which performs a recursive clone
by executing an external command.

When running repack while doing repo writes,
packfile_load__cb() could see some temporary files in the
directory that were bigger than the usual, and makes memcmp
overflow on the p->pack_name string. This issue was reported
and fixed by bisho.

The configuration file parser used unbounded recursion to parse
multiline variables, which could lead to a stack overflow. The
issue was reported by the oss-fuzz project, issue 10048 and
fixed by Nelson Elhage.

The fix to the unbounded recursion introduced a memory leak in
the config parser. While this leak was never in a public
release, the oss-fuzz project reported this as issue 10127. The
fix was implemented by Nelson Elhage and Patrick Steinhardt.

When parsing "ok" packets received via the smart protocol, our
parsing code did not correctly verify the bounds of the
packets, which could result in a heap-buffer overflow. The
issue was reported by the oss-fuzz project, issue 9749 and
fixed by Patrick Steinhardt.

The parsing code for the smart protocol has been tightened in
general, fixing heap-buffer overflows when parsing the packet
type as well as for "ACK" and "unpack" packets. The issue was
discovered and fixed by Patrick Steinhardt.

Fixed potential integer overflows on platforms with 16 bit
integers when parsing packets for the smart protocol. The issue
was discovered and fixed by Patrick Steinhardt.

Fixed potential NULL pointer dereference when parsing
configuration files which have "include.path" or
"includeIf..path" statements without a value.
---

https://github.com/libgit2/libgit2/releases/tag/v0.27.5
https://github.com/libgit2/libgit2/releases/tag/v0.26.7

I will be bumping in a few minutes, then will request testing and stabilization.
Comment 1 Larry the Git Cow gentoo-dev 2018-10-06 07:11:21 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7cb35a6deb16e24e672a2dd010b8bf422ac3c49

commit c7cb35a6deb16e24e672a2dd010b8bf422ac3c49
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-10-06 06:47:09 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-10-06 07:10:49 +0000

    dev-libs/libgit2: Sec-bump to 0.27.5
    
    Bug: https://bugs.gentoo.org/667860
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-libs/libgit2/Manifest              |  1 +
 dev-libs/libgit2/libgit2-0.27.5.ebuild | 82 ++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61075eb72a164eae47cf57a1d87cacaf4604b44a

commit 61075eb72a164eae47cf57a1d87cacaf4604b44a
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-10-06 06:46:18 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-10-06 07:10:42 +0000

    dev-libs/libgit2: Sec-bump to 0.26.7
    
    Bug: https://bugs.gentoo.org/667860
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-libs/libgit2/Manifest              |  1 +
 dev-libs/libgit2/libgit2-0.26.7.ebuild | 82 ++++++++++++++++++++++++++++++++++
 2 files changed, 83 insertions(+)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-10-06 07:12:20 UTC
Arch teams, please proceed.
Comment 3 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-10-06 21:54:12 UTC
amd64 stable
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2018-10-06 23:06:49 UTC
x86 stable
Comment 5 Larry the Git Cow gentoo-dev 2018-10-07 08:16:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e09c96777582b82f6d84fb2d865151fbced1dfb4

commit e09c96777582b82f6d84fb2d865151fbced1dfb4
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2018-10-07 08:13:15 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-10-07 08:16:43 +0000

    dev-libs/libgit2: Sec cleanup
    
    Bug: https://bugs.gentoo.org/667860
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-libs/libgit2/Manifest              |  2 -
 dev-libs/libgit2/libgit2-0.26.6.ebuild | 82 ----------------------------------
 dev-libs/libgit2/libgit2-0.27.4.ebuild | 82 ----------------------------------
 3 files changed, 166 deletions(-)