[GitHub] [xerces-c] rouault opened a new pull request, #51: [XERCESC-2241] Fix integer overflows in DFAContentMo del class

GitBox <[email protected]>
Newsgroups gmane.text.xml.xerces-c.devel
Message-ID <[email protected]>
rouault opened a new pull request, #51:
URL: https://github.com/apache/xerces-c/pull/51

   On .xsd files like the following ones (generated by ossfuzz, so broken), integer overflows can happen in DFAContentModel::countLeafNodes() and DFAContentModel::buildDFA() which can later cause out-of-bounds access.
   
   Found in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52025
   
   ```
   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
              xmlns:myns="http://myns"
              targetNamespace="http://myns"
              elementFormDefault="qualified" attributeFormDefault="unqualified">
   
   <xs:element name="main_elt">
     <xs:complexType>
        <xs:sequence>
           <xs:group ref="myns:mygroup" minOccurs="32767" maxOccurs="1"/>
         </xs:sequence>
     </xs:complexType>
   </xs:element>
   
   <xs:group name="mygroup">
     <xs:sequence>
         <!-- related to https://issues.apache.org/jira/browse/XERCESC-1051 -->
         <xs:element name="elt" maxOccurs="33333">
           <xs:complexType>
               <xs:sequence>
    ame="x" type="xs:int" maxOccurs="1"/>
               </xs:sequence>
           </xs:complexType>
         </xs:element>
     </xs:sequence>
   </xs:group>
   
   </xs:schema>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.