cncf / cncf-fuzzing

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

keycloak: Fix SamlParserFuzzer #475

Closed arthurscchan closed 3 months ago

arthurscchan commented 3 months ago

This PR fixes the original SamlParserFuzzer to include fuzzing to some other Saml Parser in the project.

arthurscchan commented 3 months ago

Sample output of the updated fuzzer

#2      pulse  ft: 322 exec/s: 0 rss: 1473Mb                                                                                                                                                                      
#2      INITED cov: 322 ft: 322 corp: 1/1b exec/s: 0 rss: 1473Mb                                                                                                                                                  
#3      NEW    cov: 336 ft: 338 corp: 2/3b lim: 4 exec/s: 1 rss: 1475Mb L: 2/2 MS: 2 InsertByte-Custom-                                                                                                           
INFO: Instrumented org.keycloak.saml.processing.core.parsers.saml.SAML11AssertionParser (took 8 ms, size +21%)                                                                                                    
INFO: Instrumented org.keycloak.dom.saml.v1.assertion.SAML11StatementAbstractType (took 1 ms, size +23%)                                                                                                          
INFO: Instrumented org.keycloak.dom.saml.v1.assertion.SAML11AuthenticationStatementType (took 10 ms, size +6%)                                                                                                    
INFO: Instrumented org.keycloak.dom.saml.v1.assertion.SAML11SubjectStatementType (took 5 ms, size +13%)                                                                                                           
INFO: Instrumented org.keycloak.dom.saml.v1.assertion.SAML11AttributeStatementType (took 5 ms, size +8%)                                                                                                          
INFO: Instrumented org.keycloak.dom.saml.v1.assertion.SAML11AuthorizationDecisionStatementType (took 8 ms, size +6%)                                                                                              
#4      pulse  cov: 336 ft: 348 corp: 2/3b lim: 4 exec/s: 1 rss: 1512Mb                                                                                                                                           
#4      NEW    cov: 346 ft: 348 corp: 3/4b lim: 4 exec/s: 1 rss: 1512Mb L: 1/2 MS: 2 ChangeBit-Custom-                                                                                                            
#6      REDUCE cov: 346 ft: 348 corp: 3/3b lim: 4 exec/s: 2 rss: 1513Mb L: 1/1 MS: 4 ChangeBit-Custom-EraseBytes-Custom-                                                                                          
#8      pulse  cov: 346 ft: 350 corp: 3/3b lim: 4 exec/s: 2 rss: 1513Mb                                                                                                                                           
#8      NEW    cov: 348 ft: 350 corp: 4/5b lim: 4 exec/s: 2 rss: 1513Mb L: 2/2 MS: 4 InsertByte-Custom-ChangeByte-Custom- 
...
#4974   NEW    cov: 1084 ft: 1204 corp: 86/415b lim: 8 exec/s: 1243 rss: 1542Mb L: 8/8 MS: 4 InsertByte-Custom-ChangeByte-Custom-
#5171   NEW    cov: 1086 ft: 1207 corp: 87/423b lim: 8 exec/s: 1292 rss: 1542Mb L: 8/8 MS: 4 ChangeBit-Custom-ShuffleBytes-Custom-
#5190   NEW    cov: 1087 ft: 1208 corp: 88/431b lim: 8 exec/s: 1297 rss: 1542Mb L: 8/8 MS: 8 PersAutoDict-Custom-ShuffleBytes-Custom-InsertByte-Custom-ChangeByte-Custom- DE: "\000<"-
#5229   NEW    cov: 1087 ft: 1211 corp: 89/439b lim: 8 exec/s: 1307 rss: 1542Mb L: 8/8 MS: 8 ChangeByte-Custom-CopyPart-Custom-ChangeByte-Custom-CopyPart-Custom-
#5250   NEW    cov: 1091 ft: 1215 corp: 90/446b lim: 8 exec/s: 1312 rss: 1542Mb L: 7/8 MS: 2 InsertByte-Custom-
#5262   REDUCE cov: 1091 ft: 1215 corp: 90/445b lim: 8 exec/s: 1315 rss: 1542Mb L: 7/8 MS: 4 ShuffleBytes-Custom-CrossOver-Custom-
#5273   NEW    cov: 1093 ft: 1217 corp: 91/452b lim: 8 exec/s: 1318 rss: 1542Mb L: 7/8 MS: 2 PersAutoDict-Custom- DE: "\377\377"-
#5400   NEW    cov: 1094 ft: 1218 corp: 92/460b lim: 8 exec/s: 1350 rss: 1542Mb L: 8/8 MS: 4 ShuffleBytes-Custom-CopyPart-Custom-
#5588   NEW    cov: 1094 ft: 1220 corp: 93/468b lim: 8 exec/s: 1397 rss: 1542Mb L: 8/8 MS: 6 ChangeByte-Custom-CrossOver-Custom-CopyPart-Custom-
#5710   REDUCE cov: 1094 ft: 1220 corp: 93/467b lim: 8 exec/s: 1427 rss: 1542Mb L: 3/8 MS: 4 ChangeBinInt-Custom