Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unchecked buffer overflows (CVE-2021-45958). #504

Closed
wants to merge 5 commits into from

Commits on Feb 12, 2022

  1. Fix unchecked buffer overflows (CVE-2021-45958).

    Add a few extra memory reserve calls to account for the extra space that
    indentation needs.
    
    These kinds of memory issues are hard to spot because the buffer is resized in
    powers of 2 meaning that a miscalculation would only show any symptoms if the
    required buffer size is estimated to be just below a 2 power but is actually
    just above. Add a debug mode which replaces the 2 power scheme with reserving
    only the memory explicitly requested and adds some overflow checks.
    bwoodsend committed Feb 12, 2022
    Configuration menu
    Copy the full SHA
    e4b8c06 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2022

  1. Configuration menu
    Copy the full SHA
    9df3bc2 View commit details
    Browse the repository at this point in the history
  2. Remove the hidden JSON_NO_EXTRA_WHITESPACE compile knob.

    Unsetting it can lead to seg-faults. I don't think it's worth having to fix and
    then test this undocumented permutation.
    bwoodsend committed Feb 13, 2022
    Configuration menu
    Copy the full SHA
    e885025 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0f4e793 View commit details
    Browse the repository at this point in the history
  4. Add fuzz test to CI/CD.

    bwoodsend committed Feb 13, 2022
    Configuration menu
    Copy the full SHA
    6e7eeab View commit details
    Browse the repository at this point in the history