<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:08:58 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[MONGOCRYPT-560] _fle2_insert_encryptionInformation raises Valgrind errors on bson_t</title>
                <link>https://jira.mongodb.org/browse/MONGOCRYPT-560</link>
                <project id="17481" key="MONGOCRYPT">Libmongocrypt</project>
                    <description>&lt;p&gt;In &lt;tt&gt;_fle2_insert_encryptionInformation&lt;/tt&gt; in &lt;tt&gt;mongocrypt-ctx-encrypt.c&lt;/tt&gt;, a Valgrind memory leak can occur when the libbson &lt;tt&gt;BSON_MEMCHECK&lt;/tt&gt; compile flag is set because:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;&lt;tt&gt;bson_t explain&lt;/tt&gt; is initialized on &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/blob/073a954d5463a90393a663ca1221129f996b16ac/src/mongocrypt-ctx-encrypt.c#L222&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line 222 (as of commit &lt;tt&gt;073a95&lt;/tt&gt;)&lt;/a&gt; but is then passed as the &lt;tt&gt;dst&lt;/tt&gt; argument to &lt;tt&gt;bson_copy_to&lt;/tt&gt; on &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/blob/073a954d5463a90393a663ca1221129f996b16ac/src/mongocrypt-ctx-encrypt.c#L275&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line 275&lt;/a&gt; which requires that &lt;tt&gt;dst&lt;/tt&gt; be uninitialized to avoid leaking memory (&lt;a href=&quot;http://mongoc.org/libbson/current/bson_copy_to.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;documentation&lt;/a&gt;)&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;bson_t out&lt;/tt&gt; is initialized on &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/blob/073a954d5463a90393a663ca1221129f996b16ac/src/mongocrypt-ctx-encrypt.c#L221&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line 221&lt;/a&gt;, but if the &lt;tt&gt;goto success&lt;/tt&gt; statement on &lt;a href=&quot;https://github.com/mongodb/libmongocrypt/blob/073a954d5463a90393a663ca1221129f996b16ac/src/mongocrypt-ctx-encrypt.c#L246&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;line 246&lt;/a&gt; is hit, then &lt;tt&gt;out&lt;/tt&gt; never gets &lt;tt&gt;bson_destroy&lt;/tt&gt;-ed before the function exits&lt;/li&gt;
&lt;/ol&gt;
</description>
                <environment></environment>
        <key id="2286106">MONGOCRYPT-560</key>
            <summary>_fle2_insert_encryptionInformation raises Valgrind errors on bson_t</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="kyle.kloberdanz@mongodb.com">Kyle Kloberdanz</assignee>
                                    <reporter username="zachary.espiritu@mongodb.com">Zachary Espiritu</reporter>
                        <labels>
                    </labels>
                <created>Sat, 11 Mar 2023 02:39:42 +0000</created>
                <updated>Thu, 27 Apr 2023 19:23:19 +0000</updated>
                            <resolved>Thu, 27 Apr 2023 19:23:19 +0000</resolved>
                                                    <fixVersion>1.8.0</fixVersion>
                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="5382427" author="xgen-internal-githook" created="Thu, 27 Apr 2023 19:22:12 +0000"  >&lt;p&gt;Author: &lt;/p&gt;
{&apos;name&apos;: &apos;Kyle Kloberdanz&apos;, &apos;email&apos;: &apos;kyle.kloberdanz@mongodb.com&apos;, &apos;username&apos;: &apos;kkloberdanz&apos;}
&lt;p&gt;Message: Improve bson_t initialization behavior (#629)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/browse/MONGOCRYPT-558&quot; title=&quot;FLE2RangeFindDriverSpec_to_ciphertexts leads to double-initializing bson_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MONGOCRYPT-558&quot;&gt;&lt;del&gt;MONGOCRYPT-558&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/MONGOCRYPT-559&quot; title=&quot;_fle2_mongo_op_markings and _create_markings_cmd_bson are double-initializing bson_t&#8217;s&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MONGOCRYPT-559&quot;&gt;&lt;del&gt;MONGOCRYPT-559&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href=&quot;https://jira.mongodb.org/browse/MONGOCRYPT-560&quot; title=&quot;_fle2_insert_encryptionInformation raises Valgrind errors on bson_t&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MONGOCRYPT-560&quot;&gt;&lt;del&gt;MONGOCRYPT-560&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This addresses the issues brought up in the above tickets. We will not be removing calls to `BSON_INITIALIZER`, but we are addressing the other issues uncovered in these tickets.&lt;/p&gt;

&lt;p&gt;Co-authored-by: Kevin Albertson &amp;lt;kevin.albertson@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libmongocrypt/commit/ec15461d69cd740d9b8b5f195fc920a2347005dd&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libmongocrypt/commit/ec15461d69cd740d9b8b5f195fc920a2347005dd&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_21957" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Binding Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="22966"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr6i7r:f0whw</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>