Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 2 Nov 2022 15:09:21 +0100
From: Hanno Böck <>
Subject: Re: OpenSSL X.509 Email Address 4-byte Buffer
 Overflow (CVE-2022-3602), X.509 Email Address Variable Length Buffer
 Overflow (CVE-2022-3786)

FWIW it only takes a basically trivial fuzz target on the affected
function to find this bug with libfuzzer.

In OpenSSL 3.0.5 code do:

./config no-shared CC=clang CFLAGS="-fsanitize=fuzzer-no-link,address"
clang -fsanitize=fuzzer,address -I$(pwd)/include punyfuzz.c libcrypto.a

with this in punyfuzz.c:

#include <stddef.h>
#include <stdint.h>
#include "crypto/punycode.h"

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  unsigned int bar[32];
  unsigned int x = 32;
  ossl_punycode_decode((const char *)data, size, bar, &x);
  return 0;

Run ./a.out and it'll crash with an ASAN error almost instantly.

Hanno Böck

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.