Skip to content

Conversation

yannaingtun
Copy link

Description of the Change:
This PR fixes a buffer overflow vulnerability (CVE-2016-4303) in the Json::parseString function. The fix addresses improper handling of UTF-16 surrogate pairs during JSON string conversion, preventing potential heap corruption and arbitrary code execution. This vulnerability was identified in the cloned function and was not patched after cJSON's original fix.

Key improvements:
Added robust buffer allocation for UTF-8 character expansion
Implemented comprehensive bounds checking
Enhanced error handling and input validation

References
CVE-2016-4303
Original Patch: esnet/iperf@91f2fa5

IceBBBBB and others added 2 commits December 24, 2024 11:05
Signed-off-by: 冰冰冰 <418776654@qq.com>

---------

Signed-off-by: 冰冰冰 <418776654@qq.com>
Signed-off-by: @wanghui187 <348582973@qq.com>
Co-authored-by: @wanghui187 <348582973@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants