summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc
diff options
context:
space:
mode:
authortb <>2019-04-13 18:42:23 +0000
committertb <>2019-04-13 18:42:23 +0000
commit72fa0e445948a698471c35be00d67bf6c770dd65 (patch)
tree68e67bf426c34e0c27c2e29dd3cdb3c9e1f11494 /src/usr.bin/nc
parent3d8cce08c8bebf3054e601a8c3dc21b4bd8fd790 (diff)
downloadopenbsd-72fa0e445948a698471c35be00d67bf6c770dd65.tar.gz
openbsd-72fa0e445948a698471c35be00d67bf6c770dd65.tar.bz2
openbsd-72fa0e445948a698471c35be00d67bf6c770dd65.zip
Avoid quadratic behavior of decimal BIGNUM conversion
The complexity of BN_bn2dec(bn) is quadratic in the length of bn. This function is used for printing numbers in CRLs which are typically small. If a BN is larger than 127 bits, dump it as hex because that's cheap and for numbers this size not significantly harder for humans to parse. OpenSSL commit 10a3195fcf7d04ba519651cf12e945a8fe470a3c by David Benjamin (still under the old licence), but significantly simplified. Ideally, we would catch excessively large numbers on deserialization, but that is made trickier by the templated ASN1. Erroring out is also not an option since the relevant part of the x509v3/ directory doesn't like to do proper error checking (looking at you v2i and i2v). Timeout found by oss-fuzz, should fix issues #13823 and #14130. input & ok jsing
Diffstat (limited to 'src/usr.bin/nc')
0 files changed, 0 insertions, 0 deletions