Revert "Disallow moving for the Parser."
This reverts commit
bd7f8c60c82614bb0bd1c526db2cbc39dac02fec.
Gbp-Pq: Name 0003-Revert-Disallow-moving-for-the-Parser.patch
Revert "Improve error messages on operator[] or as<> (#656)"
This reverts commit
012269756149ae99745b6dafefd415843d7420bb.
Gbp-Pq: Name 0002-Revert-Improve-error-messages-on-operator-or-as-656.patch
Revert "Static analysis fix: replace 0 and NULL with nullptr (#738)"
This reverts commit
db0bda7087a6fac811e78957787fc5037465ac4e.
Gbp-Pq: Name 0001-Revert-Static-analysis-fix-replace-0-and-NULL-with-n.patch
Fix unbounded recursion CVEs
Origin: https://github.com/jbeder/yaml-cpp/pull/807
Forwarded: yes
Bug: https://github.com/jbeder/yaml-cpp/issues/459
Bug: https://github.com/jbeder/yaml-cpp/issues/655
Bug: https://github.com/jbeder/yaml-cpp/issues/654
Bug: https://github.com/jbeder/yaml-cpp/issues/660
This cherry-picks the (so-far-unmerged) upstream pull request.
The final 5 commits of that PR are not included; they only add tests
to a file not present in the 0.6.2 (or 0.6.3) release.
From
d540476e31b080aa1f903ad20ec0426dd3838be7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org>
Date: Tue, 25 Apr 2017 20:10:20 -0400
Subject: [PATCH 1/9] fix stack overflow in HandleNode() (CVE-2017-5950)
simply set a hardcoded recursion limit to 2000 (inspired by Python's)
to avoid infinitely recursing into arbitrary data structures
assert() the depth. unsure if this is the right approach, but given
that HandleNode() is "void", I am not sure how else to return an
error. the problem with this approach of course is that it will still
crash the caller, unless they have proper exception handling in place.
Closes: #459
Gbp-Pq: Name fix-unbounded-recursion-depth.patch
fix-CVE-2017-11692
commit
c9460110e072df84b7dee3eb651f2ec5df75fb18
Author: Jesse Beder <jbeder@gmail.com>
Date: Mon Jan 20 18:05:15 2020 -0600
Fix reading empty token stack with a node with properties but no scalar.
E.g. `!2`.
Gbp-Pq: Name fix-CVE-2017-11692.patch
symbol-visibility
commit
df9206778fe9ff1bdd56d975c29c43dfe1e66de7
Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Fri Nov 23 15:26:53 2018 +1100
Export only YAML_CPP_API-tagged symbols on Linux.
This marks classes tagged with YAML_CPP_API with visibility("default"), to
explicitly export them, and then makes the default visibility "hidden" via
-fvisibility=hidden.
This reduces the number of exported symbols by more than 50%, which has
a small application start-up time and memory useage benefit. It also
makes it more feasible to audit the set of exported symbols in automated
ABI compatibility systems.
Gbp-Pq: Name symbol-visibility.patch