Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
e98d0a37
Unverified
Commit
e98d0a37
authored
Aug 06, 2018
by
Patrick Steinhardt
Committed by
GitHub
Aug 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4757 from pks-t/pks/v0.26.6
Release v0.26.6
parents
a3e53c16
81532654
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
.travis.yml
+1
-0
CHANGELOG.md
+15
-0
include/git2/version.h
+2
-2
src/transports/smart_pkt.c
+8
-2
No files found.
.travis.yml
View file @
e98d0a37
...
...
@@ -37,6 +37,7 @@ addons:
-
valgrind
sudo
:
false
osx_image
:
xcode8.3
matrix
:
fast_finish
:
true
...
...
CHANGELOG.md
View file @
e98d0a37
v0.26.6
-------
This is a security release fixing out-of-bounds reads when
processing smart-protocol "ng" packets.
When parsing an "ng" packet, we keep track of both the current position
as well as the remaining length of the packet itself. But instead of
taking care not to exceed the length, we pass the current pointer's
position to
`strchr`
, which will search for a certain character until
hitting NUL. It is thus possible to create a crafted packet which
doesn't contain a NUL byte to trigger an out-of-bounds read.
The issue was discovered by the oss-fuzz project, issue 9406.
v0.26.5
-------
...
...
include/git2/version.h
View file @
e98d0a37
...
...
@@ -7,10 +7,10 @@
#ifndef INCLUDE_git_version_h__
#define INCLUDE_git_version_h__
#define LIBGIT2_VERSION "0.26.
5
"
#define LIBGIT2_VERSION "0.26.
6
"
#define LIBGIT2_VER_MAJOR 0
#define LIBGIT2_VER_MINOR 26
#define LIBGIT2_VER_REVISION
5
#define LIBGIT2_VER_REVISION
6
#define LIBGIT2_VER_PATCH 0
#define LIBGIT2_SOVERSION 26
...
...
src/transports/smart_pkt.c
View file @
e98d0a37
...
...
@@ -299,8 +299,11 @@ static int ng_pkt(git_pkt **out, const char *line, size_t len)
pkt
->
ref
=
NULL
;
pkt
->
type
=
GIT_PKT_NG
;
if
(
len
<
3
)
goto
out_err
;
line
+=
3
;
/* skip "ng " */
if
(
!
(
ptr
=
strchr
(
line
,
' '
)))
len
-=
3
;
if
(
!
(
ptr
=
memchr
(
line
,
' '
,
len
)))
goto
out_err
;
len
=
ptr
-
line
;
...
...
@@ -311,8 +314,11 @@ static int ng_pkt(git_pkt **out, const char *line, size_t len)
memcpy
(
pkt
->
ref
,
line
,
len
);
pkt
->
ref
[
len
]
=
'\0'
;
if
(
len
<
1
)
goto
out_err
;
line
=
ptr
+
1
;
if
(
!
(
ptr
=
strchr
(
line
,
'\n'
)))
len
-=
1
;
if
(
!
(
ptr
=
memchr
(
line
,
'\n'
,
len
)))
goto
out_err
;
len
=
ptr
-
line
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment