aboutsummaryrefslogtreecommitdiff
path: root/src/revocation/gnunet-service-revocation.c
diff options
context:
space:
mode:
authorulfvonbelow <strilen@tilde.club>2023-01-29 05:15:30 -0600
committerMartin Schanzenbach <schanzen@gnunet.org>2023-02-06 13:31:16 +0900
commit3b5473735cb495ca50139adeb27e5135accaa22d (patch)
tree8e2b3076fcd2d7a104f1243af386e2f0146b9a18 /src/revocation/gnunet-service-revocation.c
parent1505f2f06b2d7f260811efee6597f725e4595e6c (diff)
downloadgnunet-3b5473735cb495ca50139adeb27e5135accaa22d.tar.gz
gnunet-3b5473735cb495ca50139adeb27e5135accaa22d.zip
UTIL: fix one-byte buffer over-reads.
GNUNET_CRYPTO_hash_from_string2 uses enclen as the length of its buffer that it passes to GNUNET_STRINGS_utf8_toupper, but GNUNET_STRINGS_utf8_toupper adds a null terminator, so it should be enclen+1. GNUNET_CRYPTO_crc16_step reads 1 byte past the end of the buffer passed to it. It masks out that byte in computing the result, but it's still technically an overread and could in extremely-rare circumstances cause a segmentation or access fault. It also upsets sanitizers, preventing other bugs from being found. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
Diffstat (limited to 'src/revocation/gnunet-service-revocation.c')
0 files changed, 0 insertions, 0 deletions