Bug 870147 (CVE-2013-6370) - VUL-0: CVE-2013-6370 CVE-2013-6371: json-c: buffer overflow if size_t is larger than int
Summary: VUL-0: CVE-2013-6370 CVE-2013-6371: json-c: buffer overflow if size_t is larg...
Status: RESOLVED FIXED
Alias: CVE-2013-6370
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Ismail Dönmez
QA Contact: Security Team bot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-25 12:37 UTC by Marcus Meissner
Modified: 2020-06-08 11:05 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
json-c-hash-dos-and-overflow-random-seed-4e.patch (25.95 KB, patch)
2014-04-04 08:44 UTC, Marcus Meissner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 21 Alexander Bergmann 2014-04-09 09:24:01 UTC
Public now via oss-security:

Florian Weimer of the Red Hat Product Security Team discovered two flaws
in json-c, details as follows:

1.  CVE-2013-6371 json-c: hash collision DoS

The hash function in the json-c library was weak, and that parsing
smallish JSON strings showed quadratic timing behaviour.  This could
cause an application linked to the json-c library, and that processes
some specially-crafted JSON data, to use excessive amounts of CPU.

Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1032311

2. CVE-2013-6370 json-c: buffer overflow if size_t is larger than int

The printbuf APIs used in the json-c library used ints for counting
buffer lengths, which is inappropriate for 32bit architectures.  These
functions need to be changed to using size_t if possible for sizes, or
to be hardened against negative values if not.  This could be used to
cause a denial of service in an application linked to the json-c library.

Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1032322


Both these issues are fixed via the following upstream commit:
https://github.com/json-c/json-c/commit/64e36901a0614bf64a19bc3396469c66dcd0b015
Comment 23 Bernhard Wiedemann 2014-04-09 10:00:21 UTC
This is an autogenerated message for OBS integration:
This bug (870147) was mentioned in
https://build.opensuse.org/request/show/229464 13.1 / json-c
https://build.opensuse.org/request/show/229465 Factory / json-c
Comment 30 Swamp Workflow Management 2014-04-22 14:04:25 UTC
openSUSE-SU-2014:0558-1: An update that fixes two vulnerabilities is now available.

Category: security (moderate)
Bug References: 870147
CVE References: CVE-2013-6370,CVE-2013-6371
Sources used:
openSUSE 13.1 (src):    json-c-0.10-3.4.1
openSUSE 12.3 (src):    json-c-0.9-13.4.1