cncf / cncf-fuzzing

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

Keycloak: Add SamlmetadataParserFuzzer #477

Closed arthurscchan closed 3 months ago

arthurscchan commented 3 months ago

This PR adds a fuzzer targeting parsing method of the saml metadata parser classes..

arthurscchan commented 3 months ago

Sample output

#2      pulse  ft: 323 exec/s: 1 rss: 1480Mb                                                                                                                                                                      
#2      INITED cov: 323 ft: 323 corp: 1/1b exec/s: 1 rss: 1481Mb                                                                                                                                                  
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.metadata.SAMLAuthzServiceParser (took 3 ms, size +11%)                                                                                          
#3      NEW    cov: 327 ft: 327 corp: 2/2b lim: 4 exec/s: 1 rss: 1484Mb L: 1/1 MS: 2 ChangeByte-Custom-                                                                                                           
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.metadata.SAMLAttributeServiceParser (took 3 ms, size +11%)                                                                                      
#4      pulse  cov: 327 ft: 331 corp: 2/2b lim: 4 exec/s: 2 rss: 1487Mb                                                                                                                                           
#4      NEW    cov: 331 ft: 331 corp: 3/3b lim: 4 exec/s: 2 rss: 1487Mb L: 1/1 MS: 2 ChangeBit-Custom-                                                                                                            
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.metadata.SAMLAttributeAuthorityDescriptorParser (took 7 ms, size +4%)                                                                           
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.metadata.SAMLRoleDecriptorTypeParser (took 4 ms, size +3%)                                                                                      
INFO: Instrumented org.keycloak.dom.saml.v2.metadata.RoleDescriptorType (took 17 ms, size +5%)                                                                                                                    
INFO: Instrumented org.keycloak.dom.saml.v2.metadata.TypeWithOtherAttributes (took 4 ms, size +9%)                                                                                                                
INFO: Instrumented org.keycloak.dom.saml.v2.metadata.AttributeAuthorityDescriptorType (took 12 ms, size +7%)
#8      pulse  cov: 331 ft: 336 corp: 3/3b lim: 4 exec/s: 4 rss: 1500Mb
#8      NEW    cov: 336 ft: 336 corp: 4/4b lim: 4 exec/s: 4 rss: 1500Mb L: 1/1 MS: 8 ShuffleBytes-Custom-CopyPart-Custom-EraseBytes-Custom-ChangeByte-Custom-
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.metadata.SAMLPDPDescriptorParser (took 7 ms, size +4%)
INFO: Instrumented org.keycloak.dom.saml.v2.metadata.PDPDescriptorType (took 8 ms, size +7%)
#9      NEW    cov: 340 ft: 340 corp: 5/5b lim: 4 exec/s: 4 rss: 1500Mb L: 1/1 MS: 2 ChangeByte-Custom-
...
#28654  NEW    cov: 1113 ft: 1434 corp: 202/3113b lim: 43 exec/s: 4093 rss: 1501Mb L: 41/43 MS: 2 CopyPart-Custom-                                                                                                
#28684  REDUCE cov: 1113 ft: 1434 corp: 202/3100b lim: 43 exec/s: 4097 rss: 1501Mb L: 16/43 MS: 10 PersAutoDict-Custom-ChangeBit-Custom-ChangeBinInt-Custom-ChangeBinInt-Custom-EraseBytes-Custom- DE: "\015\000\0
00\000"-                                                                                                                                                                                                          
#28975  NEW    cov: 1113 ft: 1436 corp: 203/3141b lim: 43 exec/s: 4139 rss: 1501Mb L: 41/43 MS: 2 CopyPart-Custom-                                                                                                
#28976  REDUCE cov: 1113 ft: 1436 corp: 203/3136b lim: 43 exec/s: 4139 rss: 1501Mb L: 36/43 MS: 2 EraseBytes-Custom-                                                                                              
#29020  REDUCE cov: 1113 ft: 1436 corp: 203/3130b lim: 43 exec/s: 4145 rss: 1501Mb L: 7/43 MS: 8 ChangeBinInt-Custom-CMP-Custom-EraseBytes-Custom-ChangeBinInt-Custom- DE: "\377\377\377\377"-                    
#29076  NEW    cov: 1113 ft: 1437 corp: 204/3171b lim: 43 exec/s: 4153 rss: 1501Mb L: 41/43 MS: 2 CMP-Custom- DE: "log4j.category."-                                                                              
#29153  REDUCE cov: 1113 ft: 1437 corp: 204/3169b lim: 43 exec/s: 4164 rss: 1501Mb L: 8/43 MS: 4 ChangeBinInt-Custom-EraseBytes-Custom-                                                                           
#29236  NEW    cov: 1113 ft: 1438 corp: 205/3212b lim: 43 exec/s: 4176 rss: 1501Mb L: 43/43 MS: 6 InsertByte-Custom-InsertRepeatedBytes-Custom-CopyPart-Custom-