cncf / cncf-fuzzing

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

Keycloak: Add SamlProtocolParserFuzzer #476

Closed arthurscchan closed 3 months ago

arthurscchan commented 3 months ago

This PR adds a fuzzer targeting the Saml Protocol Parser package.

arthurscchan commented 3 months ago

Sample output

#2      pulse  ft: 328 exec/s: 0 rss: 1359Mb                                                                                                                                                                      
#2      INITED cov: 328 ft: 328 corp: 1/1b exec/s: 0 rss: 1360Mb                                                                                                                                                  INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.protocol.SAMLSloResponseParser (took 8 ms, size +4%)                                                                                            
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.protocol.SAMLStatusResponseTypeParser (took 2 ms, size +5%)                                                                                     
#3      NEW    cov: 333 ft: 335 corp: 2/2b lim: 4 exec/s: 1 rss: 1374Mb L: 1/1 MS: 2 ChangeBit-Custom-                                                                                                            
#4      pulse  cov: 333 ft: 335 corp: 2/2b lim: 4 exec/s: 1 rss: 1376Mb                                                                                                                                           
#6      NEW    cov: 361 ft: 365 corp: 3/6b lim: 4 exec/s: 2 rss: 1379Mb L: 4/4 MS: 6 CrossOver-Custom-ChangeBit-Custom-CopyPart-Custom-                                                                           
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.protocol.SAMLAttributeQueryParser (took 7 ms, size +3%)                                                                                         
INFO: Instrumented org.keycloak.dom.saml.v2.protocol.AttributeQueryType (took 4 ms, size +9%)                                                                                                                     
INFO: Instrumented org.keycloak.dom.saml.v2.protocol.SubjectQueryAbstractType (took 3 ms, size +12%)                                                                                                              
#7      NEW    cov: 374 ft: 378 corp: 4/7b lim: 4 exec/s: 2 rss: 1416Mb L: 1/4 MS: 2 ChangeByte-Custom-                                                                                                           
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.protocol.SAMLStatusCodeParser (took 8 ms, size +4%)                                                                                             
#8      pulse  cov: 374 ft: 382 corp: 4/7b lim: 4 exec/s: 2 rss: 1418Mb                                                                                                                                           
#8      NEW    cov: 378 ft: 382 corp: 5/9b lim: 4 exec/s: 2 rss: 1418Mb L: 2/4 MS: 2 InsertByte-Custom- 
...
#18989  REDUCE cov: 1069 ft: 1340 corp: 181/1859b lim: 21 exec/s: 2712 rss: 1510Mb L: 20/21 MS: 2 CopyPart-Custom-                                                                                                
#19073  REDUCE cov: 1069 ft: 1340 corp: 181/1848b lim: 21 exec/s: 2724 rss: 1510Mb L: 7/21 MS: 8 ShuffleBytes-Custom-CopyPart-Custom-ChangeBinInt-Custom-CrossOver-Custom-                                        
#19120  NEW    cov: 1069 ft: 1342 corp: 182/1861b lim: 21 exec/s: 2731 rss: 1510Mb L: 13/21 MS: 4 ChangeByte-Custom-ShuffleBytes-Custom-                                                                          
#19176  REDUCE cov: 1069 ft: 1342 corp: 182/1857b lim: 21 exec/s: 2739 rss: 1510Mb L: 9/21 MS: 2 EraseBytes-Custom-                                                                                               
INFO: Instrumented com.ctc.wstx.compat.QNameCreator (took 2 ms, size +8%)                                                                                                                                         
INFO: Instrumented com.ctc.wstx.compat.QNameCreator$Helper (took 2 ms, size +14%)                                                                                                                                 
INFO: Instrumented com.ctc.wstx.evt.CompactStartElement (took 11 ms, size +13%)                                                                                                                                   
INFO: Instrumented com.ctc.wstx.evt.BaseStartElement (took 8 ms, size +14%)                                                                                                                                       
#19234  REDUCE cov: 1137 ft: 1419 corp: 183/1871b lim: 21 exec/s: 2747 rss: 1510Mb L: 14/21 MS: 6 CrossOver-Custom-ChangeByte-Custom-ChangeBinInt-Custom-                                    
#19257  REDUCE cov: 1137 ft: 1419 corp: 183/1870b lim: 21 exec/s: 2751 rss: 1510Mb L: 14/21 MS: 6 ChangeBit-Custom-ChangeByte-Custom-EraseBytes-Custom-                                                           
#19465  NEW    cov: 1137 ft: 1421 corp: 184/1891b lim: 21 exec/s: 2780 rss: 1510Mb L: 21/21 MS: 6 CopyPart-Custom-EraseBytes-Custom-CopyPart-Custom-        
#19476  REDUCE cov: 1137 ft: 1421 corp: 184/1885b lim: 21 exec/s: 2782 rss: 1510Mb L: 7/21 MS: 2 EraseBytes-Custom-                                               
#19530  NEW    cov: 1152 ft: 1436 corp: 185/1890b lim: 21 exec/s: 2790 rss: 1510Mb L: 5/21 MS: 8 ChangeByte-Custom-ShuffleBytes-Custom-CopyPart-Custom-InsertByte-Custom-                                         
#19561  NEW    cov: 1152 ft: 1437 corp: 186/1895b lim: 21 exec/s: 2794 rss: 1510Mb L: 5/21 MS: 2 EraseBytes-Custom-                                                     
#19644  REDUCE cov: 1152 ft: 1437 corp: 186/1887b lim: 21 exec/s: 2806 rss: 1510Mb L: 9/21 MS: 6 ChangeBinInt-Custom-PersAutoDict-Custom-EraseBytes-Custom- DE: "\376\000\000\000"-