Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
6dff3838
Commit
6dff3838
authored
8 years ago
by
Roman Tsisyk
Browse files
Options
Downloads
Patches
Plain Diff
Fix out-of-bounds access in xrow_header_decode() and request_decode()
Fixes TALOS-2016-0255 Fixes CVE-2016-9037 Fixes #1992
parent
feb8ff92
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/box/request.cc
+5
-5
5 additions, 5 deletions
src/box/request.cc
src/box/xrow.cc
+3
-2
3 additions, 2 deletions
src/box/xrow.cc
with
8 additions
and
7 deletions
src/box/request.cc
+
5
−
5
View file @
6dff3838
...
...
@@ -70,13 +70,13 @@ request_decode(struct request *request, const char *data, uint32_t len)
mp_check
(
&
data
,
end
);
continue
;
}
unsigned
char
key
=
mp_decode_uint
(
&
data
);
key_map
&=
~
iproto_key_bit
(
key
);
uint64_t
key
=
mp_decode_uint
(
&
data
);
const
char
*
value
=
data
;
if
(
mp_check
(
&
data
,
end
)
)
goto
error
;
if
(
iproto_key_type
[
key
]
!=
mp_typeof
(
*
value
))
if
(
mp_check
(
&
data
,
end
)
!=
0
||
key
>=
IPROTO_KEY_MAX
||
iproto_key_type
[
key
]
!=
mp_typeof
(
*
value
))
goto
error
;
key_map
&=
~
iproto_key_bit
(
key
);
switch
(
key
)
{
case
IPROTO_SPACE_ID
:
request
->
space_id
=
mp_decode_uint
(
&
value
);
...
...
This diff is collapsed.
Click to expand it.
src/box/xrow.cc
+
3
−
2
View file @
6dff3838
...
...
@@ -60,8 +60,9 @@ xrow_header_decode(struct xrow_header *header, const char **pos,
for
(
uint32_t
i
=
0
;
i
<
size
;
i
++
)
{
if
(
mp_typeof
(
**
pos
)
!=
MP_UINT
)
goto
error
;
unsigned
char
key
=
mp_decode_uint
(
pos
);
if
(
iproto_key_type
[
key
]
!=
mp_typeof
(
**
pos
))
uint64_t
key
=
mp_decode_uint
(
pos
);
if
(
key
>=
IPROTO_KEY_MAX
||
iproto_key_type
[
key
]
!=
mp_typeof
(
**
pos
))
goto
error
;
switch
(
key
)
{
case
IPROTO_REQUEST_TYPE
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment