cncf / cncf-fuzzing

✨🔐 CNCF Fuzzers
https://cncf.io/projects
Apache License 2.0
111 stars 41 forks source link

keycloak: Add SamlAssertionParserFuzzer #479

Closed arthurscchan closed 3 months ago

arthurscchan commented 3 months ago

This PR add a fuzzer targeting parsing method of Saml Assertion related parser classes.

arthurscchan commented 3 months ago

Sample output

#2      pulse  ft: 321 exec/s: 0 rss: 1354Mb                                                                                                                                                                      
#2      INITED cov: 321 ft: 321 corp: 1/1b exec/s: 0 rss: 1354Mb                                                                                                                                                  
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.assertion.SAMLEncryptedAssertionParser (took 7 ms, size +8%)                                                                                    
INFO: Instrumented org.keycloak.dom.saml.v2.assertion.EncryptedAssertionType (took 3 ms, size +17%)                                                                                                               
INFO: Instrumented org.keycloak.dom.saml.v2.assertion.EncryptedElementType (took 4 ms, size +15%)                                                                                                                 
INFO: Instrumented org.keycloak.saml.common.util.SecurityActions (took 11 ms, size +24%)                                                                                                                          
INFO: Instrumented org.keycloak.saml.common.util.TransformerUtil (took 11 ms, size +16%)                                                                                                                          
INFO: Instrumented org.keycloak.saml.common.util.TransformerUtil$PicketLinkStaxToDOMTransformer (took 18 ms, size +22%)                                                                                           
INFO: Instrumented org.keycloak.saml.common.util.DocumentUtil (took 21 ms, size +14%)                                                                                                                             
INFO: Instrumented org.w3c.dom.DOMException (took 1 ms, size +8%)                                                                                                                                                 
INFO: Instrumented org.xml.sax.SAXException (took 12 ms, size +11%)                                                                                                                                               
INFO: Instrumented org.keycloak.saml.common.util.DocumentUtil$1 (took 3 ms, size +10%)                                                                                                                            
INFO: Instrumented org.keycloak.saml.common.util.SystemPropertiesUtil (took 4 ms, size +24%)                                                                                                                      
INFO: Instrumented org.keycloak.saml.common.util.StringUtil (took 5 ms, size +66%)                                                                                                                                
INFO: Instrumented org.w3c.dom.traversal.DocumentTraversal (took 0 ms, size +0%)                                                                                                                                  
INFO: Instrumented org.w3c.dom.events.DocumentEvent (took 0 ms, size +0%)                                                                                                                                         
INFO: Instrumented org.w3c.dom.ranges.DocumentRange (took 0 ms, size +0%)                                                                                                                                         
INFO: Instrumented org.w3c.dom.Document (took 0 ms, size +0%)                                                                                                                                                     
INFO: Instrumented org.w3c.dom.NodeList (took 0 ms, size +0%)                                                                                                                                                     
INFO: Instrumented org.w3c.dom.events.EventTarget (took 0 ms, size +0%)                                                                                                                                           
INFO: Instrumented org.w3c.dom.DocumentType (took 0 ms, size +0%)                                                                                                                                                 
INFO: Instrumented org.w3c.dom.Element (took 0 ms, size +0%)                                                                                                                                                      
INFO: Instrumented org.w3c.dom.ElementTraversal (took 0 ms, size +0%)                                                                                                                                             
INFO: Instrumented org.w3c.dom.TypeInfo (took 0 ms, size +0%)                                                                                                                                                     
#3      NEW    cov: 407 ft: 414 corp: 2/3b lim: 4 exec/s: 1 rss: 1356Mb L: 2/2 MS: 2 InsertByte-Custom-                                                                                                           
#4      pulse  cov: 407 ft: 422 corp: 2/3b lim: 4 exec/s: 1 rss: 1356Mb                                                                                                                                           
#4      NEW    cov: 415 ft: 422 corp: 3/4b lim: 4 exec/s: 1 rss: 1356Mb L: 1/2 MS: 2 CrossOver-Custom-
...
#10937  NEW    cov: 1190 ft: 1418 corp: 154/1409b lim: 17 exec/s: 2187 rss: 1361Mb L: 11/17 MS: 4 ShuffleBytes-Custom-EraseBytes-Custom-
#10964  REDUCE cov: 1190 ft: 1418 corp: 154/1406b lim: 17 exec/s: 2192 rss: 1361Mb L: 14/17 MS: 4 ShuffleBytes-Custom-EraseBytes-Custom-
#11023  NEW    cov: 1190 ft: 1419 corp: 155/1420b lim: 17 exec/s: 2204 rss: 1361Mb L: 14/17 MS: 8 InsertRepeatedBytes-Custom-CrossOver-Custom-ChangeByte-Custom-ShuffleBytes-Custom-
#11029  REDUCE cov: 1190 ft: 1419 corp: 155/1414b lim: 17 exec/s: 2205 rss: 1361Mb L: 6/17 MS: 2 EraseBytes-Custom-
#11030  NEW    cov: 1192 ft: 1421 corp: 156/1417b lim: 17 exec/s: 2206 rss: 1361Mb L: 3/17 MS: 2 CrossOver-Custom-
#11062  REDUCE cov: 1192 ft: 1421 corp: 156/1415b lim: 17 exec/s: 2212 rss: 1361Mb L: 6/17 MS: 4 InsertByte-Custom-EraseBytes-Custom-
#11104  REDUCE cov: 1192 ft: 1421 corp: 156/1414b lim: 17 exec/s: 2220 rss: 1361Mb L: 15/17 MS: 4 ShuffleBytes-Custom-EraseBytes-Custom-
#11127  REDUCE cov: 1192 ft: 1421 corp: 156/1411b lim: 17 exec/s: 2225 rss: 1361Mb L: 11/17 MS: 6 ChangeBit-Custom-InsertByte-Custom-EraseBytes-Custom-
#11129  NEW    cov: 1193 ft: 1422 corp: 157/1420b lim: 17 exec/s: 2225 rss: 1361Mb L: 9/17 MS: 4 CrossOver-Custom-CopyPart-Custom-
#11135  REDUCE cov: 1193 ft: 1422 corp: 157/1419b lim: 17 exec/s: 2227 rss: 1361Mb L: 3/17 MS: 2 EraseBytes-Custom-
#11176  REDUCE cov: 1193 ft: 1422 corp: 157/1416b lim: 17 exec/s: 2235 rss: 1361Mb L: 7/17 MS: 2 EraseBytes-Custom-
#11308  REDUCE cov: 1193 ft: 1422 corp: 157/1414b lim: 17 exec/s: 2261 rss: 1361Mb L: 15/17 MS: 4 CopyPart-Custom-EraseBytes-Custom-