<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<p class="details" style="font-style: italic; color: #777;">
<a href="https://gitlab.com/rockdaboot">Tim Rühsen</a> created an issue:
</p>
<div></div>
<ul dir="auto">
<li>there is no global init (or deinit) function for libtasn1 to reset global variables after use</li>
<li>global variables are accessed without locking -> no thread-safety</li>
<li>calling asn1_parser2tree()/asn1_delete_structure() can only be done once due to global variable state</li>
<li>that means fuzzing with libFuzzer is currently now possible</li>
</ul>
<p dir="auto">Just for fuzzing, there is a simple solution: adding a asn1_global_init() function to set all global variables to default values.</p>
<p dir="auto">There yacc options like <code>%option reentrant</code>. But I assume that we need a session struct and alloc/free functions to achieve parallel parser operations. I'm not deep enough into yacc/flex to quickly make this up.</p>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/libtasn1/issues/19">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/2d2473358a3767a47f7d4294e053d899/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/libtasn1/issues/19"}}</script>
</p>
</div>
</body>
</html>