buffer overflow in msgpack_object_print_buffer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
msgpack-c (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
`msgpack_
The official is fixed the problem in 3.2.1 version.
https:/
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libmsgpackc2 2.1.5-1
ProcVersionSign
Uname: Linux 4.15.0-55-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
Date: Thu Jan 30 18:54:19 2020
Dependencies:
gcc-8-base 8.3.0-6ubuntu1~
libc6 2.27-3ubuntu1
libgcc1 1:8.3.0-
InstallationDate: Installed on 2018-01-11 (749 days ago)
InstallationMedia: Ubuntu-Server 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: msgpack-c
UpgradeStatus: Upgraded to bionic on 2019-06-05 (239 days ago)
information type: | Private Security → Public Security |
Changed in msgpack-c (Ubuntu): | |
status: | New → Confirmed |
Proof of concept: github. com/msgpack/ msgpack- c)
(http://
diff --git a/example/ c/user_ buffer_ unpack. c b/example/ c/user_ buffer_ unpack. c c/user_ buffer_ unpack. c c/user_ buffer_ unpack. c
index 646a9f67..041d8983 100644
--- a/example/
+++ b/example/
@@ -2,7 +2,7 @@
#include <stdio.h>
#include <assert.h>
-#define UNPACKED_ BUFFER_ SIZE 2048 BUFFER_ SIZE 64
+#define UNPACKED_
void prepare( msgpack_ sbuffer* sbuf) { msgpack_ sbuffer* sbuf) { pack_array( &pk, 3); pack_int( &pk, 1); pack_true( &pk); pack_str( &pk, 7); pack_str_ body(&pk, "example", 7); pack_str( &pk, 64); pack_str_ body(&pk, "aaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaaaaaaaaaaaa aaaaa", 64); pack_str( &pk, 6); pack_str_ body(&pk, "second", 6);
msgpack_packer pk;
@@ -12,8 +12,8 @@ void prepare(
msgpack_
msgpack_
msgpack_
- msgpack_
- msgpack_
+ msgpack_
+ msgpack_
/* 2nd object */
msgpack_
msgpack_