├── examples ├── upng_fuzzer │ ├── corpus │ │ ├── da39a3ee5e6b4b0d3255bfef95601890afd80709-1 │ │ ├── df6f79247b050d7062569008a31617cfe0e89162-3 │ │ ├── b93eab29c1e9cf8c410170f4a80718479bd3888e-1 │ │ ├── blog.png │ │ ├── godoc.png │ │ ├── logo.png │ │ ├── lseek.png │ │ ├── play.png │ │ ├── seek.png │ │ ├── tour.png │ │ ├── avatars.png │ │ ├── basn0g01.png │ │ ├── basn0g02.png │ │ ├── basn0g04.png │ │ ├── basn0g08.png │ │ ├── basn0g16.png │ │ ├── basn2c08.png │ │ ├── basn2c16.png │ │ ├── basn3p01.png │ │ ├── basn3p02.png │ │ ├── basn3p04.png │ │ ├── basn3p08.png │ │ ├── basn4a08.png │ │ ├── basn4a16.png │ │ ├── basn6a08.png │ │ ├── basn6a16.png │ │ ├── codewalk.png │ │ ├── glenda.png │ │ ├── godoc1.png │ │ ├── gopher.png │ │ ├── gopkgdoc.png │ │ ├── gowiki.png │ │ ├── javadoc.png │ │ ├── javadoc1.png │ │ ├── melnrv.png │ │ ├── usergroups.png │ │ ├── video-001.png │ │ ├── basn0g01-30.png │ │ ├── basn0g02-29.png │ │ ├── basn0g04-31.png │ │ ├── basn3p08-trns.png │ │ ├── gobyexample.png │ │ ├── video-001.rgb.png │ │ ├── chrome-app-list.png │ │ ├── video-001.cmyk.png │ │ ├── video-005.gray.png │ │ ├── video-001.221212.png │ │ ├── video-display-128.png │ │ ├── video-display-16.png │ │ ├── video-display-39.png │ │ ├── video-display-48.png │ │ ├── 0027e9c17f97bc035782fee6b4c725abb5e25f5f-2 │ │ ├── 00517f5aa1e18e23fca42cf38ab134f2ee765434-3 │ │ ├── 00dcf3b74a9553b55b7541ad87e4a9e74ceb945c-1 │ │ ├── 0108cb3ffdd8419f254310bece00b10be94ec6d4-2 │ │ ├── 034f375ccbb5853b7e42f32841a926f18c3bf735-3 │ │ ├── 037e1dce07a9e3ca4da03010653c2a8a77c59b5e-3 │ │ ├── 0a1f68f71933ce9fd9b2a2aa7b3d0f97e1a36216-2 │ │ ├── 0ab5ce03a2bcc238197b86bd3cab732a4a481418-1 │ │ ├── 0b326a0ddde0bd0ebd8b6be422deb462674b1b3f-1 │ │ ├── 0b5a11b1c7d83b2a1d0ef0e069b72adae88ed7dd-3 │ │ ├── 0d905eab4cfc9deb2957aea0e3b13d18b130ed8b-2 │ │ ├── 0dd3be4cf3dc65bb5338704a8d8a35263c906690-3 │ │ ├── 117c4e175e2435097beb5068edbae8cc5f9f4cd6-5 │ │ ├── 127f73e53412d58682f8acbefa0e09bc156a22ff-1 │ │ ├── 12ad9a668d24a41656014e848fa23970abfd23ac-1 │ │ ├── 12c78abf392fdda9bfe61e9796fbfcc20dfe802d-1 │ │ ├── 13795f323871ec568e35f2352e7801924546b36f-3 │ │ ├── 148a5c4b58b248b60634e127932e30251e950ad8-4 │ │ ├── 14ae84e8a092a63d43331627c11a6a88aca6ec45 │ │ ├── 15ddc5e994b3387da752983c100c37467626e1e0-3 │ │ ├── 15e96024a96d22be0f010c8a7c481920edd91497-1 │ │ ├── 16ed9ebdb784125b94cbb1a85f82af955d07e3d2 │ │ ├── 1c05dd641ccf454c428f0281e4cdf43b07bd52d2-1 │ │ ├── 1eab641ad1599e2438f60aa32fe27433ea4863b8-1 │ │ ├── 22f545ac6b50163ce39bac49094c3f64e0858403-1 │ │ ├── 2aa36734e06a846a8323bcf89e30feecdc8389e2-7 │ │ ├── 2c25477cdac8902b0d851f5e05c79b71a92e5531-1 │ │ ├── 2ced3873c1332ee2ebc779228acb3189229022e1-1 │ │ ├── 2d6d6bcc2d03afc5e08e8ec203d7bb54656e21e3-5 │ │ ├── 2da5335384ca419c2c85397bda9cfcacf7a0318c-2 │ │ ├── 2e062d20a0cca038f1ee953e51cbb38ac7292b4e │ │ ├── 2e73ade615380f6d0cdc400bd582b06e5529e0c1-1 │ │ ├── 2eaed460776e298a171a47362191aa7b4922f00d-1 │ │ ├── 300a4ee19316b6f3322de1830573b3a90751040d-5 │ │ ├── 302ce15c1437a3b3ec96d4533e52005ded16ab4d-1 │ │ ├── 3074797fbd3c849871ab985852066bb033486dab-1 │ │ ├── 3085d9f10aeda5d3753f7b2928dcdbfebaf3eb90-1 │ │ ├── 32982a85d5413a2427c04202ec02f59a91a7031d-1 │ │ ├── 32aab3b071b3f2a16c11f8ac7f5b4d66a8fc4507-3 │ │ ├── 32f48b55e90f7265b3cc27b6c94b78738bb60fc3-3 │ │ ├── 359c6e90da6fb75859b9f79957fc4ddecd21d573-1 │ │ ├── 3ae857ba3fd75f5177f5b5fd276520a4db77f31a-1 │ │ ├── 3b9088fef1f9c4ab8c6273b9a64157a82b5ef034-2 │ │ ├── 3c7923f135d358fd685065fde8a996d474367da2-3 │ │ ├── 4092a1b3c3c398013e020bd2442c2633eb6b46e5-2 │ │ ├── 40a4eb006ad01deccf5f8734fc389b697578bb80-1 │ │ ├── 41102d75135bd5b24412585bdcde9310ae5514b7-2 │ │ ├── 42e294a2f99c362df602ae7e6d1ca51c610c77c4-2 │ │ ├── 43c46bbeb42ddfc4b697b444e8788fe4134f6fbd-4 │ │ ├── 441147639a347838dbbb9e086165898b180ad028-1 │ │ ├── 443e2d19d95927e08571f449d2a85803d18cf444-1 │ │ ├── 447a6d045ebdb25fab3c95a3da9c2fe7fd9a9716 │ │ ├── 4703db0a05fce2d9a2f41556cefce55a2c19ed95-3 │ │ ├── 474fdd94658b3e53307e5ec3228ed5c9b4291e95-8 │ │ ├── 483a091771c905face02a07e12aabf8bc166341f-1 │ │ ├── 4930d001f211f78029c9deace8bb8671e27a5397-4 │ │ ├── 4a5e5f4ebd8c4f5939233346db4948e7741929e3-1 │ │ ├── 4b43c105e8752c56eb99dceb1d9c07f391e5068c-1 │ │ ├── 4caece539b039b16e16206ea2478f8c5ffb2ca05-1 │ │ ├── 4dc7c853b712fded554642a47f578dd91e74d03e-3 │ │ ├── 4fd5d18fedc498c1d0e1f639f78846afc480cd49-1 │ │ ├── 51a449f03915597276625385e11890025affd0fe │ │ ├── 51bf9c2e1973256af20d03638ddd1e4a08170c56-2 │ │ ├── 51ca246743e0becb959ac41fff15351ff7be1d2b-1 │ │ ├── 52222c98852e1fb04392209c3690d1fdff20b0a2-2 │ │ ├── 5229ab863ea1c80e6e3f704213f67133495c89c2-1 │ │ ├── 52fdc39a64c9286ade823e259598544e96800a56-1 │ │ ├── 53517011ea62e7883f7b882ea73903d84214fd4b-1 │ │ ├── 53978a1ca57db4486948dfd53af87f779541e806-1 │ │ ├── 55d5565d5ceb8e771b8aded0fcabd1285f6ae0b4-2 │ │ ├── 56d22a91725f7866af3ff83ecc4f2366bb090702 │ │ ├── 56e853e0c97cf3545bf5d07e1da6af4a02c25d03-1 │ │ ├── 590f52619d52c86fd7e8f3f382a6cde0b2226768-1 │ │ ├── 5959fe1cbe6e8121111436ff6ba85179dc5b3f2f-2 │ │ ├── 5a4a06fbf89b096243ad1913d672be6ac4928d01-1 │ │ ├── 5ae18e28747857476ed8ef0d84acc72e163200c8-2 │ │ ├── 5b1a9783453da5c5bb1508caead4d7ff1d921e7f-1 │ │ ├── 5bb66ee51ce51892a0fd995f696a60e0ce3fdad1-1 │ │ ├── 5c2e0d0942de506683c25f71e273932a51111606-2 │ │ ├── 5c3ed56ce71be1412d4d679d15d4b0c081385cfe-3 │ │ ├── 5c62d7fba1cd4183fe07a4fbbe02cc879e33ff49-2 │ │ ├── 5db4055e7e6135ec7a8d809c5ed62097d09896f3-1 │ │ ├── 5ee62104de8f531886611824259038ee8f6e79df-4 │ │ ├── 5feb61a34b18ce576c5a0c9742c6a46579a3e624-5 │ │ ├── 600353555f82bf04ca06bf0e39f6da2a64eed072-1 │ │ ├── 60d1058a596ce671ffdab86c56cd640b907f4d6e-6 │ │ ├── 613227c7b7ef9b8f24855406f8a68eb3864927c5-9 │ │ ├── 614b09838d5867d9e6ff4202b14df45b420d1028-3 │ │ ├── 62240a0acb24ab2881c965af977424c680a2515a-7 │ │ ├── 638b6e26dada718725094e8e24a924238c0f6ba2-1 │ │ ├── 6501ca9b5b51871fd3d746ec52fe25e6132e84ae-2 │ │ ├── 651e8f86c759b5af78feb03ce0a5f230667e2cbb-3 │ │ ├── 688058a04c2b788b0505528d4f39d21440a8f01d-1 │ │ ├── 6bc76dce20edd98facf91d4c1042829349a1a04e-1 │ │ ├── 6d8517258c3774ae20a5954e0bcfda647a9bccd1 │ │ ├── 6f3ca98164cf1c22cda16c0bac66f98ac4fd3d16-1 │ │ ├── 6fbc55167b017f4ab3d5f7137f1de72274c8d032-1 │ │ ├── 7237858385aaeb6b201a52dcd785ac6f4799c409-9 │ │ ├── 73acde269904c8d7a2f0510001ecd2094e2a746c-2 │ │ ├── 741430e87a0725f1945f031a8238dd6e6abe175f │ │ ├── 74f6ec0cad9f4e9521146f9817e8f9cca8a8e609-3 │ │ ├── 75e7b7bd456951c15e142598b411b97ae7f539ed-1 │ │ ├── 76d8d302cfd1ee4e0028e85fb9041e36eb09754c-1 │ │ ├── 76f02e882765f0d7c4e0869eccb8b38fafe10578-2 │ │ ├── 7711e18b2b44945783da057d06091bf49f0810ac-4 │ │ ├── 7dcef54cfee91ad8aa6056a852f91e18b7126562 │ │ ├── 7e8c29074f7e532cfbb30bbf8d98a471e7c6803c-1 │ │ ├── 7ec3b6786a08cf84cf5ca6d28c311768b5002315-3 │ │ ├── 7f01cddd37b3715b4ccd2181677fa015a87ab66a-2 │ │ ├── 8290e19c7f99845c5306d5d9998b78f3054e3ad2-1 │ │ ├── 848c7b39dd3d8eff109761638b48a3e415ed101d-1 │ │ ├── 855b87c1cbbf12a7d9a12b6f95412e5e37ecace6-3 │ │ ├── 868af26175682af083e7bde617503bf828e12698-1 │ │ ├── 86e7dbb5f28c7921d87543d9a287cd201963ba40-1 │ │ ├── 87dfa604a79c22e1c539185feb9e9dadae1f3a84 │ │ ├── 902493e2a117787bf9cd4fd1115f879f7234019b-8 │ │ ├── 9035316834ef9fb2b886d58d6682c4e38f802af6-1 │ │ ├── 9154c6a05226feb956531e6f2afb7c7c4fe05b7f-1 │ │ ├── 9175315c4ed25cefc8b63ccd865971344245fc8d │ │ ├── 93376e828da6fe890f8c55455014d67b3272ad06-4 │ │ ├── 93b2e05d995413e0a442857c3dab406a51b5c853-1 │ │ ├── 95f6ef79e5a9d7a3fc54b1733154ee88c142e28c-1 │ │ ├── 96f6b7c6545f3057817a1723e2350007bc72479e-1 │ │ ├── 98629896d8695c569ff524052f7f523ad16817d7-6 │ │ ├── 9876de91518c2b63ce0ac9dba9e9c1977b4bfe00-5 │ │ ├── 98b0bb7d8e0d0d8a4fe7825b7f94af5817e567f8-1 │ │ ├── 99681abd813c376f83140bcb97ee823b9927066e-1 │ │ ├── 9a6c6587be40129e52d05516f095754afa9a5d95-3 │ │ ├── 9cebc998a4c8fc284fbca9c7a5274518ea61357b-1 │ │ ├── 9d34214c14b749df567a60a402d4366ac993dc01 │ │ ├── 9ff38239e6fbcd4684f993e94504b686fa1aee5e │ │ ├── a0b1983ca8913c14f4f50f981b0df42c8ddd1852-2 │ │ ├── a2d15b48a0cb7b02e51ee2d3cad8496cd8c50cbd-1 │ │ ├── a3168c39022748a272eb8a7349343a8aa3439dec-1 │ │ ├── a38a699f0b6500793048c19b1165765b2ba91085-1 │ │ ├── a5a6656087f34fc8cab1df8611daad94675ca8fb-2 │ │ ├── a65eea323f35206f24fc00a9d2789414860f4bee-1 │ │ ├── a79aad443002166b949239092391641bad586631-1 │ │ ├── ab14a0713426a031530a53c6f3055d890f4adcce │ │ ├── ac938f541a19b0dac85ec0098c16ddb14a0a4cfc-1 │ │ ├── acafeafb7daff683e5f87949919070341a090fd2-2 │ │ ├── acf3f58110990c4981f58d52c23875390c2fc171-8 │ │ ├── ae305a56ff52e92b96d37025a9b10fbdf2b9509e-2 │ │ ├── ae885de7d55fa9061fd292e7b761369bc1683d1a-1 │ │ ├── b2c494c8c5124c63445a9dba6f2247e414f3e3c3-1 │ │ ├── b4ec3178797fd5b12fb88918392f841db5431f00-1 │ │ ├── b617da4dccebbd65cf5a36bf73215803017db050-8 │ │ ├── b88395bac8db25d00ad29b318831589ac40e9b57 │ │ ├── b9348150b4d7e1d7d3c989774af242557b11b47b-1 │ │ ├── b9eb820e65e85de9a6472f7ded14392206f60f30-2 │ │ ├── bab2afd5b1c82095a63f311140c868bf8d0dd119-2 │ │ ├── babd8015d347f6d7830f993054ae0a5ddfd5d8f0-1 │ │ ├── bbc1a5a67b0715e703f71e07a6f5ee3d370b4ee6-3 │ │ ├── bbdc16a15585c266443a3aa4a0dfe66ae42de588-5 │ │ ├── bcfba11760419e9e6b4bb62d5187242033075673-6 │ │ ├── be02dacf65d812ca7fad144d6c3e0769866ee73b-2 │ │ ├── be2a942852e6e4ee7d2f91c9fa3255cf86cc6bda-1 │ │ ├── bec86c142bfa5f64dd772ae19d40a0ef5d5712ae-2 │ │ ├── bf07a8a9ab49379a369310db40c8ea517b69ad86-1 │ │ ├── c091380a0240301b59016ee5577fc690efadafc8-3 │ │ ├── c21211984a69e13861d610d950a03bad2e47b3a2-1 │ │ ├── c2d89db6147ad67c0b99051f6b226216709d74aa-3 │ │ ├── ca564a22a5070fb1592fa226f37742b1accbfe36-1 │ │ ├── cf551048681ed9caad791cf0544183138a82c790-1 │ │ ├── d0f435a173742d4ee735810b9c1d0d4a202c6859-2 │ │ ├── d1498f22b6fcf076d67e81c7785518cd77ec4eee-2 │ │ ├── d17dc5d11f0d64601766b6d08a98eff3a7e90134-1 │ │ ├── d28598a9bf7befbd756e8b3706945a867af51f7a-2 │ │ ├── d3a655e91ab21a772519e68a880b9a688f918140-2 │ │ ├── d43a5857917f65ed57e7fe622795bdc636af194a-2 │ │ ├── d446be6373be79de3ad27234ad9e86341db65b62-2 │ │ ├── d61111036fdc816412a907a21e5a958ebdf2cfa2-6 │ │ ├── d92789c16feb5ba0db2a649c5b004e7fb0da3cb0-2 │ │ ├── dcd73995fe0d306e6d478e9fdc5c9f3be3280a28-2 │ │ ├── df6c8819922811197eb8b17369e379060099fce8-1 │ │ ├── dfd45824068a7bc64a5bb7aab7341ba2b85215ff-3 │ │ ├── dff2eb81160520d278c22651ed36593f87152535-1 │ │ ├── e0656d1f95e3a99508dce65f60112a2cbe70af7e-2 │ │ ├── e1cf630f92b189742c6e98aa8511eea636326256-4 │ │ ├── e30d59429b7167c8061b08054f75887034cdccf3-2 │ │ ├── e61abc368fef3694f6f301879e2d025f36b39013-6 │ │ ├── e7199edbdc407faed34b881d732bfeea8d499163-2 │ │ ├── e808e9e97db9e2f0537537273e97d46172f9cad9-2 │ │ ├── e8f8aeaa25c3f19d9fd2ad6bd9b0b0829a13ef51-1 │ │ ├── ea1c6c30e25d9a8fe984833d5f1cdfe7f83858df-2 │ │ ├── ea7bcb5bad66c28c7a9b3f0250b3714f4f96ebf3-1 │ │ ├── ea921a19beb982d10d5a8e177b8a0e00f2f64ab6-2 │ │ ├── eac133cad005f402558fe26e0b8500db00c9b56f-9 │ │ ├── eb90d0a7f79de9136bd710924b387f2485360d99-1 │ │ ├── ec1459fe4d8b65807d910c61d9a935ad72c90227-5 │ │ ├── ed367fed8bdf478a4cdde4987318b7cb457a3a75-2 │ │ ├── ed7acf5b9a00ddc1aac08c8f972c2cb03e7a9f62-2 │ │ ├── ee0aa94ded46f4de5d1963d2d45aba338736f936-1 │ │ ├── ee34b3540889f028f6f936fb3527e0ad6c9a2de8-1 │ │ ├── efb23c0cc059d877436b71bbba0fbadce65f83b7-2 │ │ ├── f30a96ba7d8f1efb2a551654854bb1faa25c6f8e-2 │ │ ├── f693d8165cad9c74bcaa077ff068798a4c97302a-3 │ │ ├── f6b6e401214cf842a6bb7629394f91fe72b76bba-3 │ │ ├── f7386654a561d3d56549489fa587e6257350ab9e-2 │ │ ├── f7e799f943fbb4eca4f440c1adbb5b489c5edfc2-1 │ │ ├── f7f9022cb0645ff7cbb7d8cb41bade1cfc939c45-1 │ │ ├── f90ba0941f308d9350d75649a8a8af5891677935-3 │ │ ├── fa8fb3bc68dc11bc8ca81caf1131f922b6c6598d-2 │ │ ├── fca5a444f8a81a63a82f4ecb8c11d4c1a503aca3-1 │ │ ├── fef3a15e89629bbf33ab6bdb1c6b09ae1f2e28fd-2 │ │ ├── ff341f97c6db6ad42ed0c8750f072cd2e076426b-4 │ │ ├── ff64c465b906b75c6b939bdc5eba0dc24f3ca9e4-4 │ │ ├── 077972773f02e194c01dea9e0e6a62c8a71c2144-10 │ │ ├── 1a2bff9ec69843c6ba5c787bcbe8811646fae90e-10 │ │ ├── 25d983ea18e8fcfad90484d30bce9016a542f1e5-12 │ │ ├── 7c872942689925ab0ca90309c6957dc5808bed18-10 │ │ ├── chrome-beknehfpfkghjoafdifaflglpjkojoco-Default.png │ │ ├── chrome-bepbmhgboaologfdajaanbcjmnhjmhfn-Default.png │ │ ├── chrome-coobgpohoikkiipiblmjeljniedjpjpf-Default.png │ │ ├── chrome-gbchcmhmhahfdphkhkmpfmihenigjmpp-Default.png │ │ ├── chrome-lfpnjcnjegcbbbioninfdekgnaeaigpn-Default.png │ │ └── chrome-npcpnahjfihkilahpohiieimoffneflm-Default.png │ ├── bin │ │ ├── src │ │ │ ├── .gitignore │ │ │ ├── upng │ │ │ ├── upng.asan │ │ │ ├── png2tga.c │ │ │ ├── Makefile │ │ │ ├── upng.h │ │ │ ├── glview.c │ │ │ └── README │ │ └── upng │ ├── src │ │ ├── .upngzz.rs.swp │ │ ├── main.rs │ │ ├── stubs.rs │ │ └── upngzz.rs │ ├── Cargo.toml │ ├── entitlements.xml │ ├── Makefile │ └── README.md ├── simple_fuzzer │ ├── bin │ │ ├── simple_program │ │ ├── Makefile │ │ └── simple_program.c │ ├── Cargo.toml │ ├── entitlements.xml │ ├── Makefile │ └── README.md ├── simple_tracer │ ├── Cargo.toml │ ├── entitlements.xml │ ├── Makefile │ ├── README.md │ └── src │ │ └── main.rs └── simple_executor │ ├── Cargo.toml │ ├── entitlements.xml │ ├── Makefile │ ├── README.md │ └── src │ └── main.rs ├── tests └── test_programs │ ├── simple_test │ ├── cmp_unrolling │ ├── cmp_unrolling.c │ ├── Makefile │ └── simple_test.c ├── entitlements.xml ├── .gitignore ├── Cargo.toml ├── Makefile ├── src ├── tracer.rs ├── crash.rs ├── backtrace.rs ├── lib.rs ├── utils.rs ├── caches.rs ├── error.rs └── corpus.rs └── README.md /examples/upng_fuzzer/corpus/da39a3ee5e6b4b0d3255bfef95601890afd80709-1: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/df6f79247b050d7062569008a31617cfe0e89162-3: -------------------------------------------------------------------------------- 1 | bad unic -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b93eab29c1e9cf8c410170f4a80718479bd3888e-1: -------------------------------------------------------------------------------- 1 | PNG 2 |  3 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/.gitignore: -------------------------------------------------------------------------------- 1 | png2tga 2 | glview 3 | *.o 4 | *.sh 5 | *.png 6 | *.tga 7 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/upng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/bin/upng -------------------------------------------------------------------------------- /tests/test_programs/simple_test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/tests/test_programs/simple_test -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/upng: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/bin/src/upng -------------------------------------------------------------------------------- /tests/test_programs/cmp_unrolling: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/tests/test_programs/cmp_unrolling -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/blog.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/godoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/godoc.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/logo.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/lseek.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/lseek.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/play.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/seek.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/seek.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/tour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/tour.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/upng.asan: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/bin/src/upng.asan -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/avatars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/avatars.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g01.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g02.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g04.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g08.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g16.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn2c08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn2c08.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn2c16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn2c16.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn3p01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn3p01.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn3p02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn3p02.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn3p04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn3p04.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn3p08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn3p08.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn4a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn4a08.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn4a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn4a16.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn6a08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn6a08.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn6a16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn6a16.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/codewalk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/codewalk.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/glenda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/glenda.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/godoc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/godoc1.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/gopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/gopher.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/gopkgdoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/gopkgdoc.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/gowiki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/gowiki.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/javadoc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/javadoc.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/javadoc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/javadoc1.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/melnrv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/melnrv.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/src/.upngzz.rs.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/src/.upngzz.rs.swp -------------------------------------------------------------------------------- /examples/simple_fuzzer/bin/simple_program: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/simple_fuzzer/bin/simple_program -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/usergroups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/usergroups.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-001.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g01-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g01-30.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g02-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g02-29.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn0g04-31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn0g04-31.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/basn3p08-trns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/basn3p08-trns.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/gobyexample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/gobyexample.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-001.rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-001.rgb.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-app-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-app-list.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-001.cmyk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-001.cmyk.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-005.gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-005.gray.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-001.221212.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-001.221212.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-display-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-display-128.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-display-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-display-16.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-display-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-display-39.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/video-display-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/video-display-48.png -------------------------------------------------------------------------------- /examples/simple_fuzzer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple_fuzzer" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | hyperpom = { path = "../../" } 8 | -------------------------------------------------------------------------------- /examples/simple_tracer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple_tracer" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | hyperpom = { path = "../../" } 8 | -------------------------------------------------------------------------------- /examples/simple_executor/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple_executor" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | hyperpom = { path = "../../" } 8 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0027e9c17f97bc035782fee6b4c725abb5e25f5f-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0027e9c17f97bc035782fee6b4c725abb5e25f5f-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/00517f5aa1e18e23fca42cf38ab134f2ee765434-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/00517f5aa1e18e23fca42cf38ab134f2ee765434-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/00dcf3b74a9553b55b7541ad87e4a9e74ceb945c-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/00dcf3b74a9553b55b7541ad87e4a9e74ceb945c-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0108cb3ffdd8419f254310bece00b10be94ec6d4-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0108cb3ffdd8419f254310bece00b10be94ec6d4-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/034f375ccbb5853b7e42f32841a926f18c3bf735-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/034f375ccbb5853b7e42f32841a926f18c3bf735-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/037e1dce07a9e3ca4da03010653c2a8a77c59b5e-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/037e1dce07a9e3ca4da03010653c2a8a77c59b5e-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0a1f68f71933ce9fd9b2a2aa7b3d0f97e1a36216-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0a1f68f71933ce9fd9b2a2aa7b3d0f97e1a36216-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0ab5ce03a2bcc238197b86bd3cab732a4a481418-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0ab5ce03a2bcc238197b86bd3cab732a4a481418-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0b326a0ddde0bd0ebd8b6be422deb462674b1b3f-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0b326a0ddde0bd0ebd8b6be422deb462674b1b3f-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0b5a11b1c7d83b2a1d0ef0e069b72adae88ed7dd-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0b5a11b1c7d83b2a1d0ef0e069b72adae88ed7dd-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0d905eab4cfc9deb2957aea0e3b13d18b130ed8b-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0d905eab4cfc9deb2957aea0e3b13d18b130ed8b-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/0dd3be4cf3dc65bb5338704a8d8a35263c906690-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/0dd3be4cf3dc65bb5338704a8d8a35263c906690-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/117c4e175e2435097beb5068edbae8cc5f9f4cd6-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/117c4e175e2435097beb5068edbae8cc5f9f4cd6-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/127f73e53412d58682f8acbefa0e09bc156a22ff-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/127f73e53412d58682f8acbefa0e09bc156a22ff-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/12ad9a668d24a41656014e848fa23970abfd23ac-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/12ad9a668d24a41656014e848fa23970abfd23ac-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/12c78abf392fdda9bfe61e9796fbfcc20dfe802d-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/12c78abf392fdda9bfe61e9796fbfcc20dfe802d-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/13795f323871ec568e35f2352e7801924546b36f-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/13795f323871ec568e35f2352e7801924546b36f-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/148a5c4b58b248b60634e127932e30251e950ad8-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/148a5c4b58b248b60634e127932e30251e950ad8-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/14ae84e8a092a63d43331627c11a6a88aca6ec45: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/14ae84e8a092a63d43331627c11a6a88aca6ec45 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/15ddc5e994b3387da752983c100c37467626e1e0-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/15ddc5e994b3387da752983c100c37467626e1e0-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/15e96024a96d22be0f010c8a7c481920edd91497-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/15e96024a96d22be0f010c8a7c481920edd91497-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/16ed9ebdb784125b94cbb1a85f82af955d07e3d2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/16ed9ebdb784125b94cbb1a85f82af955d07e3d2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/1c05dd641ccf454c428f0281e4cdf43b07bd52d2-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/1c05dd641ccf454c428f0281e4cdf43b07bd52d2-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/1eab641ad1599e2438f60aa32fe27433ea4863b8-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/1eab641ad1599e2438f60aa32fe27433ea4863b8-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/22f545ac6b50163ce39bac49094c3f64e0858403-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/22f545ac6b50163ce39bac49094c3f64e0858403-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2aa36734e06a846a8323bcf89e30feecdc8389e2-7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2aa36734e06a846a8323bcf89e30feecdc8389e2-7 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2c25477cdac8902b0d851f5e05c79b71a92e5531-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2c25477cdac8902b0d851f5e05c79b71a92e5531-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2ced3873c1332ee2ebc779228acb3189229022e1-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2ced3873c1332ee2ebc779228acb3189229022e1-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2d6d6bcc2d03afc5e08e8ec203d7bb54656e21e3-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2d6d6bcc2d03afc5e08e8ec203d7bb54656e21e3-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2da5335384ca419c2c85397bda9cfcacf7a0318c-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2da5335384ca419c2c85397bda9cfcacf7a0318c-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2e062d20a0cca038f1ee953e51cbb38ac7292b4e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2e062d20a0cca038f1ee953e51cbb38ac7292b4e -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2e73ade615380f6d0cdc400bd582b06e5529e0c1-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2e73ade615380f6d0cdc400bd582b06e5529e0c1-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/2eaed460776e298a171a47362191aa7b4922f00d-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/2eaed460776e298a171a47362191aa7b4922f00d-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/300a4ee19316b6f3322de1830573b3a90751040d-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/300a4ee19316b6f3322de1830573b3a90751040d-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/302ce15c1437a3b3ec96d4533e52005ded16ab4d-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/302ce15c1437a3b3ec96d4533e52005ded16ab4d-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/3074797fbd3c849871ab985852066bb033486dab-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/3074797fbd3c849871ab985852066bb033486dab-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/3085d9f10aeda5d3753f7b2928dcdbfebaf3eb90-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/3085d9f10aeda5d3753f7b2928dcdbfebaf3eb90-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/32982a85d5413a2427c04202ec02f59a91a7031d-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/32982a85d5413a2427c04202ec02f59a91a7031d-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/32aab3b071b3f2a16c11f8ac7f5b4d66a8fc4507-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/32aab3b071b3f2a16c11f8ac7f5b4d66a8fc4507-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/32f48b55e90f7265b3cc27b6c94b78738bb60fc3-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/32f48b55e90f7265b3cc27b6c94b78738bb60fc3-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/359c6e90da6fb75859b9f79957fc4ddecd21d573-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/359c6e90da6fb75859b9f79957fc4ddecd21d573-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/3ae857ba3fd75f5177f5b5fd276520a4db77f31a-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/3ae857ba3fd75f5177f5b5fd276520a4db77f31a-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/3b9088fef1f9c4ab8c6273b9a64157a82b5ef034-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/3b9088fef1f9c4ab8c6273b9a64157a82b5ef034-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/3c7923f135d358fd685065fde8a996d474367da2-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/3c7923f135d358fd685065fde8a996d474367da2-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4092a1b3c3c398013e020bd2442c2633eb6b46e5-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4092a1b3c3c398013e020bd2442c2633eb6b46e5-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/40a4eb006ad01deccf5f8734fc389b697578bb80-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/40a4eb006ad01deccf5f8734fc389b697578bb80-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/41102d75135bd5b24412585bdcde9310ae5514b7-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/41102d75135bd5b24412585bdcde9310ae5514b7-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/42e294a2f99c362df602ae7e6d1ca51c610c77c4-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/42e294a2f99c362df602ae7e6d1ca51c610c77c4-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/43c46bbeb42ddfc4b697b444e8788fe4134f6fbd-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/43c46bbeb42ddfc4b697b444e8788fe4134f6fbd-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/441147639a347838dbbb9e086165898b180ad028-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/441147639a347838dbbb9e086165898b180ad028-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/443e2d19d95927e08571f449d2a85803d18cf444-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/443e2d19d95927e08571f449d2a85803d18cf444-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/447a6d045ebdb25fab3c95a3da9c2fe7fd9a9716: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/447a6d045ebdb25fab3c95a3da9c2fe7fd9a9716 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4703db0a05fce2d9a2f41556cefce55a2c19ed95-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4703db0a05fce2d9a2f41556cefce55a2c19ed95-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/474fdd94658b3e53307e5ec3228ed5c9b4291e95-8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/474fdd94658b3e53307e5ec3228ed5c9b4291e95-8 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/483a091771c905face02a07e12aabf8bc166341f-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/483a091771c905face02a07e12aabf8bc166341f-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4930d001f211f78029c9deace8bb8671e27a5397-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4930d001f211f78029c9deace8bb8671e27a5397-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4a5e5f4ebd8c4f5939233346db4948e7741929e3-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4a5e5f4ebd8c4f5939233346db4948e7741929e3-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4b43c105e8752c56eb99dceb1d9c07f391e5068c-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4b43c105e8752c56eb99dceb1d9c07f391e5068c-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4caece539b039b16e16206ea2478f8c5ffb2ca05-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4caece539b039b16e16206ea2478f8c5ffb2ca05-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4dc7c853b712fded554642a47f578dd91e74d03e-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4dc7c853b712fded554642a47f578dd91e74d03e-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/4fd5d18fedc498c1d0e1f639f78846afc480cd49-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/4fd5d18fedc498c1d0e1f639f78846afc480cd49-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/51a449f03915597276625385e11890025affd0fe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/51a449f03915597276625385e11890025affd0fe -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/51bf9c2e1973256af20d03638ddd1e4a08170c56-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/51bf9c2e1973256af20d03638ddd1e4a08170c56-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/51ca246743e0becb959ac41fff15351ff7be1d2b-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/51ca246743e0becb959ac41fff15351ff7be1d2b-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/52222c98852e1fb04392209c3690d1fdff20b0a2-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/52222c98852e1fb04392209c3690d1fdff20b0a2-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5229ab863ea1c80e6e3f704213f67133495c89c2-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5229ab863ea1c80e6e3f704213f67133495c89c2-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/52fdc39a64c9286ade823e259598544e96800a56-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/52fdc39a64c9286ade823e259598544e96800a56-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/53517011ea62e7883f7b882ea73903d84214fd4b-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/53517011ea62e7883f7b882ea73903d84214fd4b-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/53978a1ca57db4486948dfd53af87f779541e806-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/53978a1ca57db4486948dfd53af87f779541e806-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/55d5565d5ceb8e771b8aded0fcabd1285f6ae0b4-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/55d5565d5ceb8e771b8aded0fcabd1285f6ae0b4-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/56d22a91725f7866af3ff83ecc4f2366bb090702: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/56d22a91725f7866af3ff83ecc4f2366bb090702 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/56e853e0c97cf3545bf5d07e1da6af4a02c25d03-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/56e853e0c97cf3545bf5d07e1da6af4a02c25d03-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/590f52619d52c86fd7e8f3f382a6cde0b2226768-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/590f52619d52c86fd7e8f3f382a6cde0b2226768-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5959fe1cbe6e8121111436ff6ba85179dc5b3f2f-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5959fe1cbe6e8121111436ff6ba85179dc5b3f2f-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5a4a06fbf89b096243ad1913d672be6ac4928d01-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5a4a06fbf89b096243ad1913d672be6ac4928d01-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5ae18e28747857476ed8ef0d84acc72e163200c8-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5ae18e28747857476ed8ef0d84acc72e163200c8-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5b1a9783453da5c5bb1508caead4d7ff1d921e7f-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5b1a9783453da5c5bb1508caead4d7ff1d921e7f-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5bb66ee51ce51892a0fd995f696a60e0ce3fdad1-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5bb66ee51ce51892a0fd995f696a60e0ce3fdad1-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5c2e0d0942de506683c25f71e273932a51111606-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5c2e0d0942de506683c25f71e273932a51111606-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5c3ed56ce71be1412d4d679d15d4b0c081385cfe-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5c3ed56ce71be1412d4d679d15d4b0c081385cfe-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5c62d7fba1cd4183fe07a4fbbe02cc879e33ff49-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5c62d7fba1cd4183fe07a4fbbe02cc879e33ff49-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5db4055e7e6135ec7a8d809c5ed62097d09896f3-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5db4055e7e6135ec7a8d809c5ed62097d09896f3-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5ee62104de8f531886611824259038ee8f6e79df-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5ee62104de8f531886611824259038ee8f6e79df-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/5feb61a34b18ce576c5a0c9742c6a46579a3e624-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/5feb61a34b18ce576c5a0c9742c6a46579a3e624-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/600353555f82bf04ca06bf0e39f6da2a64eed072-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/600353555f82bf04ca06bf0e39f6da2a64eed072-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/60d1058a596ce671ffdab86c56cd640b907f4d6e-6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/60d1058a596ce671ffdab86c56cd640b907f4d6e-6 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/613227c7b7ef9b8f24855406f8a68eb3864927c5-9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/613227c7b7ef9b8f24855406f8a68eb3864927c5-9 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/614b09838d5867d9e6ff4202b14df45b420d1028-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/614b09838d5867d9e6ff4202b14df45b420d1028-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/62240a0acb24ab2881c965af977424c680a2515a-7: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/62240a0acb24ab2881c965af977424c680a2515a-7 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/638b6e26dada718725094e8e24a924238c0f6ba2-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/638b6e26dada718725094e8e24a924238c0f6ba2-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/6501ca9b5b51871fd3d746ec52fe25e6132e84ae-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/6501ca9b5b51871fd3d746ec52fe25e6132e84ae-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/651e8f86c759b5af78feb03ce0a5f230667e2cbb-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/651e8f86c759b5af78feb03ce0a5f230667e2cbb-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/688058a04c2b788b0505528d4f39d21440a8f01d-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/688058a04c2b788b0505528d4f39d21440a8f01d-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/6bc76dce20edd98facf91d4c1042829349a1a04e-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/6bc76dce20edd98facf91d4c1042829349a1a04e-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/6d8517258c3774ae20a5954e0bcfda647a9bccd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/6d8517258c3774ae20a5954e0bcfda647a9bccd1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/6f3ca98164cf1c22cda16c0bac66f98ac4fd3d16-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/6f3ca98164cf1c22cda16c0bac66f98ac4fd3d16-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/6fbc55167b017f4ab3d5f7137f1de72274c8d032-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/6fbc55167b017f4ab3d5f7137f1de72274c8d032-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7237858385aaeb6b201a52dcd785ac6f4799c409-9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7237858385aaeb6b201a52dcd785ac6f4799c409-9 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/73acde269904c8d7a2f0510001ecd2094e2a746c-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/73acde269904c8d7a2f0510001ecd2094e2a746c-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/741430e87a0725f1945f031a8238dd6e6abe175f: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/741430e87a0725f1945f031a8238dd6e6abe175f -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/74f6ec0cad9f4e9521146f9817e8f9cca8a8e609-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/74f6ec0cad9f4e9521146f9817e8f9cca8a8e609-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/75e7b7bd456951c15e142598b411b97ae7f539ed-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/75e7b7bd456951c15e142598b411b97ae7f539ed-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/76d8d302cfd1ee4e0028e85fb9041e36eb09754c-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/76d8d302cfd1ee4e0028e85fb9041e36eb09754c-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/76f02e882765f0d7c4e0869eccb8b38fafe10578-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/76f02e882765f0d7c4e0869eccb8b38fafe10578-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7711e18b2b44945783da057d06091bf49f0810ac-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7711e18b2b44945783da057d06091bf49f0810ac-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7dcef54cfee91ad8aa6056a852f91e18b7126562: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7dcef54cfee91ad8aa6056a852f91e18b7126562 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7e8c29074f7e532cfbb30bbf8d98a471e7c6803c-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7e8c29074f7e532cfbb30bbf8d98a471e7c6803c-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7ec3b6786a08cf84cf5ca6d28c311768b5002315-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7ec3b6786a08cf84cf5ca6d28c311768b5002315-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7f01cddd37b3715b4ccd2181677fa015a87ab66a-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7f01cddd37b3715b4ccd2181677fa015a87ab66a-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/8290e19c7f99845c5306d5d9998b78f3054e3ad2-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/8290e19c7f99845c5306d5d9998b78f3054e3ad2-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/848c7b39dd3d8eff109761638b48a3e415ed101d-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/848c7b39dd3d8eff109761638b48a3e415ed101d-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/855b87c1cbbf12a7d9a12b6f95412e5e37ecace6-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/855b87c1cbbf12a7d9a12b6f95412e5e37ecace6-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/868af26175682af083e7bde617503bf828e12698-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/868af26175682af083e7bde617503bf828e12698-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/86e7dbb5f28c7921d87543d9a287cd201963ba40-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/86e7dbb5f28c7921d87543d9a287cd201963ba40-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/87dfa604a79c22e1c539185feb9e9dadae1f3a84: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/87dfa604a79c22e1c539185feb9e9dadae1f3a84 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/902493e2a117787bf9cd4fd1115f879f7234019b-8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/902493e2a117787bf9cd4fd1115f879f7234019b-8 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9035316834ef9fb2b886d58d6682c4e38f802af6-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9035316834ef9fb2b886d58d6682c4e38f802af6-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9154c6a05226feb956531e6f2afb7c7c4fe05b7f-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9154c6a05226feb956531e6f2afb7c7c4fe05b7f-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9175315c4ed25cefc8b63ccd865971344245fc8d: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9175315c4ed25cefc8b63ccd865971344245fc8d -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/93376e828da6fe890f8c55455014d67b3272ad06-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/93376e828da6fe890f8c55455014d67b3272ad06-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/93b2e05d995413e0a442857c3dab406a51b5c853-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/93b2e05d995413e0a442857c3dab406a51b5c853-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/95f6ef79e5a9d7a3fc54b1733154ee88c142e28c-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/95f6ef79e5a9d7a3fc54b1733154ee88c142e28c-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/96f6b7c6545f3057817a1723e2350007bc72479e-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/96f6b7c6545f3057817a1723e2350007bc72479e-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/98629896d8695c569ff524052f7f523ad16817d7-6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/98629896d8695c569ff524052f7f523ad16817d7-6 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9876de91518c2b63ce0ac9dba9e9c1977b4bfe00-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9876de91518c2b63ce0ac9dba9e9c1977b4bfe00-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/98b0bb7d8e0d0d8a4fe7825b7f94af5817e567f8-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/98b0bb7d8e0d0d8a4fe7825b7f94af5817e567f8-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/99681abd813c376f83140bcb97ee823b9927066e-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/99681abd813c376f83140bcb97ee823b9927066e-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9a6c6587be40129e52d05516f095754afa9a5d95-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9a6c6587be40129e52d05516f095754afa9a5d95-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9cebc998a4c8fc284fbca9c7a5274518ea61357b-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9cebc998a4c8fc284fbca9c7a5274518ea61357b-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9d34214c14b749df567a60a402d4366ac993dc01: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9d34214c14b749df567a60a402d4366ac993dc01 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/9ff38239e6fbcd4684f993e94504b686fa1aee5e: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/9ff38239e6fbcd4684f993e94504b686fa1aee5e -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a0b1983ca8913c14f4f50f981b0df42c8ddd1852-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a0b1983ca8913c14f4f50f981b0df42c8ddd1852-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a2d15b48a0cb7b02e51ee2d3cad8496cd8c50cbd-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a2d15b48a0cb7b02e51ee2d3cad8496cd8c50cbd-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a3168c39022748a272eb8a7349343a8aa3439dec-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a3168c39022748a272eb8a7349343a8aa3439dec-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a38a699f0b6500793048c19b1165765b2ba91085-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a38a699f0b6500793048c19b1165765b2ba91085-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a5a6656087f34fc8cab1df8611daad94675ca8fb-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a5a6656087f34fc8cab1df8611daad94675ca8fb-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a65eea323f35206f24fc00a9d2789414860f4bee-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a65eea323f35206f24fc00a9d2789414860f4bee-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/a79aad443002166b949239092391641bad586631-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/a79aad443002166b949239092391641bad586631-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ab14a0713426a031530a53c6f3055d890f4adcce: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ab14a0713426a031530a53c6f3055d890f4adcce -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ac938f541a19b0dac85ec0098c16ddb14a0a4cfc-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ac938f541a19b0dac85ec0098c16ddb14a0a4cfc-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/acafeafb7daff683e5f87949919070341a090fd2-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/acafeafb7daff683e5f87949919070341a090fd2-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/acf3f58110990c4981f58d52c23875390c2fc171-8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/acf3f58110990c4981f58d52c23875390c2fc171-8 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ae305a56ff52e92b96d37025a9b10fbdf2b9509e-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ae305a56ff52e92b96d37025a9b10fbdf2b9509e-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ae885de7d55fa9061fd292e7b761369bc1683d1a-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ae885de7d55fa9061fd292e7b761369bc1683d1a-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b2c494c8c5124c63445a9dba6f2247e414f3e3c3-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/b2c494c8c5124c63445a9dba6f2247e414f3e3c3-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b4ec3178797fd5b12fb88918392f841db5431f00-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/b4ec3178797fd5b12fb88918392f841db5431f00-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b617da4dccebbd65cf5a36bf73215803017db050-8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/b617da4dccebbd65cf5a36bf73215803017db050-8 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b88395bac8db25d00ad29b318831589ac40e9b57: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/b88395bac8db25d00ad29b318831589ac40e9b57 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b9348150b4d7e1d7d3c989774af242557b11b47b-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/b9348150b4d7e1d7d3c989774af242557b11b47b-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/b9eb820e65e85de9a6472f7ded14392206f60f30-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/b9eb820e65e85de9a6472f7ded14392206f60f30-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/bab2afd5b1c82095a63f311140c868bf8d0dd119-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/bab2afd5b1c82095a63f311140c868bf8d0dd119-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/babd8015d347f6d7830f993054ae0a5ddfd5d8f0-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/babd8015d347f6d7830f993054ae0a5ddfd5d8f0-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/bbc1a5a67b0715e703f71e07a6f5ee3d370b4ee6-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/bbc1a5a67b0715e703f71e07a6f5ee3d370b4ee6-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/bbdc16a15585c266443a3aa4a0dfe66ae42de588-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/bbdc16a15585c266443a3aa4a0dfe66ae42de588-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/bcfba11760419e9e6b4bb62d5187242033075673-6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/bcfba11760419e9e6b4bb62d5187242033075673-6 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/be02dacf65d812ca7fad144d6c3e0769866ee73b-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/be02dacf65d812ca7fad144d6c3e0769866ee73b-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/be2a942852e6e4ee7d2f91c9fa3255cf86cc6bda-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/be2a942852e6e4ee7d2f91c9fa3255cf86cc6bda-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/bec86c142bfa5f64dd772ae19d40a0ef5d5712ae-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/bec86c142bfa5f64dd772ae19d40a0ef5d5712ae-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/bf07a8a9ab49379a369310db40c8ea517b69ad86-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/bf07a8a9ab49379a369310db40c8ea517b69ad86-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/c091380a0240301b59016ee5577fc690efadafc8-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/c091380a0240301b59016ee5577fc690efadafc8-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/c21211984a69e13861d610d950a03bad2e47b3a2-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/c21211984a69e13861d610d950a03bad2e47b3a2-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/c2d89db6147ad67c0b99051f6b226216709d74aa-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/c2d89db6147ad67c0b99051f6b226216709d74aa-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ca564a22a5070fb1592fa226f37742b1accbfe36-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ca564a22a5070fb1592fa226f37742b1accbfe36-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/cf551048681ed9caad791cf0544183138a82c790-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/cf551048681ed9caad791cf0544183138a82c790-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d0f435a173742d4ee735810b9c1d0d4a202c6859-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d0f435a173742d4ee735810b9c1d0d4a202c6859-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d1498f22b6fcf076d67e81c7785518cd77ec4eee-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d1498f22b6fcf076d67e81c7785518cd77ec4eee-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d17dc5d11f0d64601766b6d08a98eff3a7e90134-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d17dc5d11f0d64601766b6d08a98eff3a7e90134-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d28598a9bf7befbd756e8b3706945a867af51f7a-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d28598a9bf7befbd756e8b3706945a867af51f7a-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d3a655e91ab21a772519e68a880b9a688f918140-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d3a655e91ab21a772519e68a880b9a688f918140-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d43a5857917f65ed57e7fe622795bdc636af194a-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d43a5857917f65ed57e7fe622795bdc636af194a-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d446be6373be79de3ad27234ad9e86341db65b62-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d446be6373be79de3ad27234ad9e86341db65b62-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d61111036fdc816412a907a21e5a958ebdf2cfa2-6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d61111036fdc816412a907a21e5a958ebdf2cfa2-6 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/d92789c16feb5ba0db2a649c5b004e7fb0da3cb0-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/d92789c16feb5ba0db2a649c5b004e7fb0da3cb0-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/dcd73995fe0d306e6d478e9fdc5c9f3be3280a28-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/dcd73995fe0d306e6d478e9fdc5c9f3be3280a28-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/df6c8819922811197eb8b17369e379060099fce8-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/df6c8819922811197eb8b17369e379060099fce8-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/dfd45824068a7bc64a5bb7aab7341ba2b85215ff-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/dfd45824068a7bc64a5bb7aab7341ba2b85215ff-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/dff2eb81160520d278c22651ed36593f87152535-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/dff2eb81160520d278c22651ed36593f87152535-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e0656d1f95e3a99508dce65f60112a2cbe70af7e-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e0656d1f95e3a99508dce65f60112a2cbe70af7e-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e1cf630f92b189742c6e98aa8511eea636326256-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e1cf630f92b189742c6e98aa8511eea636326256-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e30d59429b7167c8061b08054f75887034cdccf3-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e30d59429b7167c8061b08054f75887034cdccf3-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e61abc368fef3694f6f301879e2d025f36b39013-6: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e61abc368fef3694f6f301879e2d025f36b39013-6 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e7199edbdc407faed34b881d732bfeea8d499163-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e7199edbdc407faed34b881d732bfeea8d499163-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e808e9e97db9e2f0537537273e97d46172f9cad9-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e808e9e97db9e2f0537537273e97d46172f9cad9-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/e8f8aeaa25c3f19d9fd2ad6bd9b0b0829a13ef51-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/e8f8aeaa25c3f19d9fd2ad6bd9b0b0829a13ef51-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ea1c6c30e25d9a8fe984833d5f1cdfe7f83858df-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ea1c6c30e25d9a8fe984833d5f1cdfe7f83858df-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ea7bcb5bad66c28c7a9b3f0250b3714f4f96ebf3-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ea7bcb5bad66c28c7a9b3f0250b3714f4f96ebf3-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ea921a19beb982d10d5a8e177b8a0e00f2f64ab6-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ea921a19beb982d10d5a8e177b8a0e00f2f64ab6-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/eac133cad005f402558fe26e0b8500db00c9b56f-9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/eac133cad005f402558fe26e0b8500db00c9b56f-9 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/eb90d0a7f79de9136bd710924b387f2485360d99-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/eb90d0a7f79de9136bd710924b387f2485360d99-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ec1459fe4d8b65807d910c61d9a935ad72c90227-5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ec1459fe4d8b65807d910c61d9a935ad72c90227-5 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ed367fed8bdf478a4cdde4987318b7cb457a3a75-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ed367fed8bdf478a4cdde4987318b7cb457a3a75-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ed7acf5b9a00ddc1aac08c8f972c2cb03e7a9f62-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ed7acf5b9a00ddc1aac08c8f972c2cb03e7a9f62-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ee0aa94ded46f4de5d1963d2d45aba338736f936-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ee0aa94ded46f4de5d1963d2d45aba338736f936-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ee34b3540889f028f6f936fb3527e0ad6c9a2de8-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ee34b3540889f028f6f936fb3527e0ad6c9a2de8-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/efb23c0cc059d877436b71bbba0fbadce65f83b7-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/efb23c0cc059d877436b71bbba0fbadce65f83b7-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f30a96ba7d8f1efb2a551654854bb1faa25c6f8e-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f30a96ba7d8f1efb2a551654854bb1faa25c6f8e-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f693d8165cad9c74bcaa077ff068798a4c97302a-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f693d8165cad9c74bcaa077ff068798a4c97302a-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f6b6e401214cf842a6bb7629394f91fe72b76bba-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f6b6e401214cf842a6bb7629394f91fe72b76bba-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f7386654a561d3d56549489fa587e6257350ab9e-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f7386654a561d3d56549489fa587e6257350ab9e-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f7e799f943fbb4eca4f440c1adbb5b489c5edfc2-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f7e799f943fbb4eca4f440c1adbb5b489c5edfc2-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f7f9022cb0645ff7cbb7d8cb41bade1cfc939c45-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f7f9022cb0645ff7cbb7d8cb41bade1cfc939c45-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/f90ba0941f308d9350d75649a8a8af5891677935-3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/f90ba0941f308d9350d75649a8a8af5891677935-3 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/fa8fb3bc68dc11bc8ca81caf1131f922b6c6598d-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/fa8fb3bc68dc11bc8ca81caf1131f922b6c6598d-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/fca5a444f8a81a63a82f4ecb8c11d4c1a503aca3-1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/fca5a444f8a81a63a82f4ecb8c11d4c1a503aca3-1 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/fef3a15e89629bbf33ab6bdb1c6b09ae1f2e28fd-2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/fef3a15e89629bbf33ab6bdb1c6b09ae1f2e28fd-2 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ff341f97c6db6ad42ed0c8750f072cd2e076426b-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ff341f97c6db6ad42ed0c8750f072cd2e076426b-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/ff64c465b906b75c6b939bdc5eba0dc24f3ca9e4-4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/ff64c465b906b75c6b939bdc5eba0dc24f3ca9e4-4 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/077972773f02e194c01dea9e0e6a62c8a71c2144-10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/077972773f02e194c01dea9e0e6a62c8a71c2144-10 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/1a2bff9ec69843c6ba5c787bcbe8811646fae90e-10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/1a2bff9ec69843c6ba5c787bcbe8811646fae90e-10 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/25d983ea18e8fcfad90484d30bce9016a542f1e5-12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/25d983ea18e8fcfad90484d30bce9016a542f1e5-12 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/7c872942689925ab0ca90309c6957dc5808bed18-10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/7c872942689925ab0ca90309c6957dc5808bed18-10 -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-beknehfpfkghjoafdifaflglpjkojoco-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-beknehfpfkghjoafdifaflglpjkojoco-Default.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-bepbmhgboaologfdajaanbcjmnhjmhfn-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-bepbmhgboaologfdajaanbcjmnhjmhfn-Default.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-coobgpohoikkiipiblmjeljniedjpjpf-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-coobgpohoikkiipiblmjeljniedjpjpf-Default.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-gbchcmhmhahfdphkhkmpfmihenigjmpp-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-gbchcmhmhahfdphkhkmpfmihenigjmpp-Default.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-lfpnjcnjegcbbbioninfdekgnaeaigpn-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-lfpnjcnjegcbbbioninfdekgnaeaigpn-Default.png -------------------------------------------------------------------------------- /examples/upng_fuzzer/corpus/chrome-npcpnahjfihkilahpohiieimoffneflm-Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Impalabs/hyperpom/HEAD/examples/upng_fuzzer/corpus/chrome-npcpnahjfihkilahpohiieimoffneflm-Default.png -------------------------------------------------------------------------------- /entitlements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.hypervisor 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "upng_fuzzer" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | clap = { version = "4.4.8", features = ["derive"] } 8 | clap-num = "1.0.2" 9 | eyre = "0.6" 10 | goblin = "0.7.1" 11 | hyperpom = { path = "../../" } 12 | -------------------------------------------------------------------------------- /examples/simple_executor/entitlements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.hypervisor 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/simple_fuzzer/entitlements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.hypervisor 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/simple_tracer/entitlements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.hypervisor 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/entitlements.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.hypervisor 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/test_programs/cmp_unrolling.c: -------------------------------------------------------------------------------- 1 | void func0(void* input_addr); 2 | void func1(void* input_addr); 3 | void func2(void* input_addr); 4 | void func3(void* input_addr); 5 | void func4(); 6 | 7 | int main(void) { 8 | void* input_addr = 0x20000; 9 | if (*(unsigned long*)input_addr == 0xdeadbeef44434241) 10 | *(unsigned int*)0xdeadbeef = 0xcafec0c0; 11 | } 12 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/png2tga.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "upng.h" 4 | 5 | #define HI(w) (((w) >> 8) & 0xFF) 6 | #define LO(w) ((w) & 0xFF) 7 | 8 | int main(int argc, char** argv) { 9 | upng_t* upng; 10 | 11 | if (argc <= 1) { 12 | return 0; 13 | } 14 | 15 | upng = upng_new_from_file(argv[1]); 16 | upng_decode(upng); 17 | upng_free(upng); 18 | return 0; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/src/main.rs: -------------------------------------------------------------------------------- 1 | use clap::Parser; 2 | use eyre::Result; 3 | 4 | pub mod loader; 5 | pub mod stubs; 6 | pub mod upngzz; 7 | 8 | fn main() -> Result<()> { 9 | // Creates a new configuration object that contains the arguments passed to the fuzzer. 10 | let config = upngzz::Config::parse(); 11 | // Instanciates the fuzzer and starts fuzzing. 12 | upngzz::entry(config)?; 13 | Ok(()) 14 | } 15 | -------------------------------------------------------------------------------- /examples/simple_tracer/Makefile: -------------------------------------------------------------------------------- 1 | CODESIGN := codesign 2 | CARGO := cargo +nightly 3 | 4 | EXECUTOR := simple_tracer 5 | EXECUTOR_RELEASE := target/release/$(EXECUTOR) 6 | 7 | .DEFAULT_GOAL := run 8 | 9 | build: 10 | $(CARGO) fmt 11 | $(CARGO) clippy 12 | $(CARGO) build --release 13 | $(CODESIGN) --sign - --entitlements entitlements.xml --deep --force "$(EXECUTOR_RELEASE)" 14 | 15 | run: build 16 | $(EXECUTOR_RELEASE) 17 | 18 | clean: 19 | $(CARGO) clean 20 | -------------------------------------------------------------------------------- /examples/simple_executor/Makefile: -------------------------------------------------------------------------------- 1 | CODESIGN := codesign 2 | CARGO := cargo +nightly 3 | 4 | EXECUTOR := simple_executor 5 | EXECUTOR_RELEASE := target/release/$(EXECUTOR) 6 | 7 | .DEFAULT_GOAL := run 8 | 9 | build: 10 | $(CARGO) fmt 11 | $(CARGO) clippy 12 | $(CARGO) build --release 13 | $(CODESIGN) --sign - --entitlements entitlements.xml --deep --force "$(EXECUTOR_RELEASE)" 14 | 15 | run: build 16 | $(EXECUTOR_RELEASE) 17 | 18 | clean: 19 | $(CARGO) clean 20 | -------------------------------------------------------------------------------- /tests/test_programs/Makefile: -------------------------------------------------------------------------------- 1 | CC := gcc 2 | OBJCOPY := objcopy 3 | 4 | CFLAGS := -fPIC -fpie -ffreestanding -ffunction-sections -fomit-frame-pointer \ 5 | -fno-exceptions -fno-unwind-tables 6 | 7 | define build_test 8 | $(CC) $(CFLAGS) -I. -o $1 $1.c 9 | $(OBJCOPY) -O binary --strip-all $1 10 | endef 11 | 12 | .PHONY: simple_test cmp_unrolling 13 | 14 | simple_test: 15 | $(call build_test, simple_test) 16 | 17 | cmp_unrolling: 18 | $(call build_test, cmp_unrolling) 19 | -------------------------------------------------------------------------------- /examples/simple_fuzzer/bin/Makefile: -------------------------------------------------------------------------------- 1 | CC := clang 2 | OBJCOPY := objcopy 3 | RM := rm 4 | 5 | CFLAGS := -fPIC -fpie -ffreestanding -ffunction-sections -fomit-frame-pointer \ 6 | -fno-exceptions -fno-unwind-tables -O0 7 | TARGET := simple_program 8 | TARGET_SRC := $(TARGET).c 9 | 10 | .DEFAULT_GOAL := build 11 | 12 | build-macho: 13 | $(CC) $(CFLAGS) -o $(TARGET) $(TARGET_SRC) 14 | 15 | build: build-macho 16 | $(OBJCOPY) -O binary $(TARGET) 17 | 18 | clean: 19 | $(RM) $(TARGET) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | debug/ 4 | target/ 5 | 6 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 7 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 8 | Cargo.lock 9 | 10 | # These are backup files generated by rustfmt 11 | **/*.rs.bk 12 | 13 | # MSVC Windows builds of rustc generate these, which store debugging information 14 | *.pdb 15 | 16 | **/.DS_Store 17 | -------------------------------------------------------------------------------- /examples/simple_executor/README.md: -------------------------------------------------------------------------------- 1 | # Simple Executor 2 | 3 | This example showcases how an `Executor` object can be used to execute arbitrary AArch64 instructions and then retrieve the CPU and memory states. 4 | 5 | ## Running the Program 6 | 7 | To run the program you can use the `Makefile` provided and simply do: 8 | 9 | ``` 10 | make run 11 | ``` 12 | 13 | If everything went as expected you should see the following input. 14 | 15 | ```console 16 | $ target/release/hyperpom_example 17 | X0 = 0x42 18 | ``` 19 | -------------------------------------------------------------------------------- /examples/simple_tracer/README.md: -------------------------------------------------------------------------------- 1 | # Simple Tracer 2 | 3 | This example showcases how an `Executor` object can be used to trace an AArch64 program. 4 | 5 | ## Running the Program 6 | 7 | To run the program you can use the `Makefile` provided and simply do: 8 | 9 | ``` 10 | make run 11 | ``` 12 | 13 | If everything went as expected you should see the following output. 14 | 15 | ``` 16 | 0x100000: mov x0, #0 17 | 0x100004: mov x1, #0 18 | 0x100008: b #0x100024 19 | 0x100024: mov x1, #3 20 | 0x100028: cmp x0, #0x10 21 | 0x10002c: mov x0, #0x20 22 | 0x100030: b.eq #0x10001c 23 | 0x100034: b #0x10000c 24 | 0x10000c: mov x1, #1 25 | 0x100010: cmp x0, #0x30 26 | 0x100014: b.ne #0x10001c 27 | 0x10001c: mov x1, #2 28 | 0x100020: b #0x100038 29 | 0x100038: ret 30 | ``` 31 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hyperpom" 3 | version = "0.1.2" 4 | authors = ["lyte "] 5 | edition = "2021" 6 | description = "AArch64 fuzzing library based on the Apple Silicon hypervisor" 7 | documentation = "https://docs.rs/hyperpom" 8 | readme = "README.md" 9 | repository = "https://github.com/impalabs/hyperpom" 10 | license = "GPL-3.0-or-later" 11 | keywords = ["fuzzing", "hypervisor", "apple", "security", "aarch64"] 12 | categories = ["virtualization", "hardware-support", "development-tools::testing"] 13 | 14 | [dependencies] 15 | applevisor = "0.1.2" 16 | bitfield = "0.13.2" 17 | rhexdump="0.1.1" 18 | capstone = "0.11.0" 19 | keystone-engine = "0.1.0" 20 | regex = "1" 21 | time = { version = "0.3.9", features = ["local-offset", "formatting"] } -------------------------------------------------------------------------------- /tests/test_programs/simple_test.c: -------------------------------------------------------------------------------- 1 | void func0(void* input_addr); 2 | void func1(void* input_addr); 3 | void func2(void* input_addr); 4 | void func3(void* input_addr); 5 | void func4(); 6 | 7 | int main(void) { 8 | void* input_addr = 0x20000; 9 | func0(input_addr); 10 | } 11 | 12 | void func0(void* input_addr) { 13 | if (*(char *)(input_addr) == 'l') { 14 | func1(input_addr); 15 | } 16 | } 17 | 18 | void func1(void* input_addr) { 19 | if (*(char *)(input_addr + 1) == 'y') { 20 | func2(input_addr); 21 | } 22 | } 23 | 24 | void func2(void* input_addr) { 25 | if (*(char *)(input_addr + 2) == 't') { 26 | func3(input_addr); 27 | } 28 | } 29 | 30 | void func3(void* input_addr) { 31 | if (*(char *)(input_addr + 3) == 'e') { 32 | func4(); 33 | } 34 | } 35 | 36 | void func4() { 37 | *(unsigned int*)0xdeadbeef = 0xcafec0c0; 38 | } -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/Makefile: -------------------------------------------------------------------------------- 1 | NDK_PREBUILTS := $(NDK_PATH)/toolchains/llvm/prebuilt/darwin-x86_64/bin 2 | NDK_CC := $(NDK_PREBUILTS)/aarch64-linux-android31-clang 3 | CC := clang 4 | 5 | ifeq ($(TARGET_DIR), ) 6 | TARGET_DIR := . 7 | endif 8 | 9 | TARGET := upng 10 | TARGET_PATH := $(TARGET_DIR)/$(TARGET) 11 | TARGET_CFLAGS := -Wall -pedantic -g -O3 -static 12 | TARGET_ASAN := upng.asan 13 | TARGET_ASAN_PATH := $(TARGET_DIR)/$(TARGET_ASAN) 14 | TARGET_ASAN_CFLAGS := -Wall -pedantic -g -O0 -fsanitize=address 15 | 16 | .DEFAULT_GOAL := build 17 | .PHONY: check 18 | 19 | build: 20 | $(NDK_CC) -o $(TARGET_PATH) png2tga.c upng.c $(TARGET_CFLAGS) 21 | 22 | build-asan: 23 | $(CC) -o $(TARGET_ASAN_PATH) png2tga.c upng.c $(TARGET_ASAN_CFLAGS) 24 | 25 | check: build-asan 26 | $(TARGET_ASAN_PATH) $(filter-out $@,$(MAKECMDGOALS)) 27 | 28 | clean: 29 | rm $(TARGET_PATH) 30 | rm $(TARGET_ASAN_PATH) 31 | -------------------------------------------------------------------------------- /examples/simple_fuzzer/Makefile: -------------------------------------------------------------------------------- 1 | CODESIGN := codesign 2 | CARGO := cargo +nightly 3 | 4 | FUZZER := simple_fuzzer 5 | FUZZER_RELEASE := target/release/$(FUZZER) 6 | 7 | TARGET_DIR := ./bin 8 | TARGET_PROGRAM := "$(TARGET_DIR)/simple_program" 9 | TMP_DIR := ./tmp 10 | CORPUS_DIR := "$(TMP_DIR)/corpus" 11 | WORK_DIR := "$(TMP_DIR)/work" 12 | 13 | .DEFAULT_GOAL := run 14 | 15 | build-target: 16 | $(MAKE) -C $(TARGET_DIR) build 17 | 18 | clean-target: 19 | $(MAKE) -C $(TARGET_DIR) clean 20 | 21 | build: 22 | $(CARGO) fmt 23 | $(CARGO) clippy 24 | $(CARGO) build --release 25 | $(CODESIGN) --sign - --entitlements entitlements.xml --deep --force "$(FUZZER_RELEASE)" 26 | 27 | run: clean-dirs build 28 | mkdir -p $(CORPUS_DIR) 29 | mkdir -p $(WORK_DIR) 30 | $(FUZZER_RELEASE) fuzz 31 | 32 | clean-dirs: 33 | rm -rf $(CORPUS_DIR) 34 | rm -rf $(WORK_DIR) 35 | 36 | clean: clean-dirs clean-target 37 | $(CARGO) clean 38 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | CODESIGN := codesign 2 | CARGO := cargo +nightly 3 | 4 | TARGET := hyperpom 5 | TARGET_DEBUG := target/debug/$(TARGET) 6 | TARGET_RELEASE := target/release/$(TARGET) 7 | 8 | TMP_DIR := ./tmp 9 | CORPUS_DIR := "$(TMP_DIR)/corpus" 10 | WORK_DIR := "$(TMP_DIR)/work" 11 | 12 | ENTITLEMENTS := entitlements.xml 13 | 14 | build-debug: 15 | $(CARGO) fmt 16 | $(CARGO) build 17 | 18 | build-release: 19 | $(CARGO) fmt 20 | $(CARGO) build --release 21 | 22 | build-test: 23 | $(CARGO) test --no-run 24 | $(CODESIGN) --sign - --entitlements "$(ENTITLEMENTS)" --deep --force \ 25 | $(shell $(CARGO) test --no-run --message-format=json | \ 26 | jq -r "select(.profile.test == true) | .filenames[]") 27 | 28 | build-test-release: 29 | $(CARGO) test --no-run --release 30 | $(CODESIGN) --sign - --entitlements "$(ENTITLEMENTS)" --deep --force \ 31 | $(shell $(CARGO) test --no-run --release --message-format=json | \ 32 | jq -r "select(.profile.test == true) | .filenames[]") 33 | 34 | tmp-dirs: 35 | mkdir -p $(CORPUS_DIR) 36 | mkdir -p $(WORK_DIR) 37 | 38 | test: clean-dirs tmp-dirs build-test 39 | $(CARGO) test $(filter-out $@,$(MAKECMDGOALS)) -- --nocapture \ 40 | --test-threads=1 41 | 42 | tests: clean-dirs tmp-dirs build-test 43 | $(CARGO) test --tests -- --nocapture --test-threads=1 44 | 45 | tests-release: build-test-release 46 | $(CARGO) test --release --tests -- --nocapture --test-threads=1 47 | 48 | tests-threads: build-test 49 | $(CARGO) test --tests -- --nocapture 50 | 51 | clean-dirs: 52 | rm -rf $(CORPUS_DIR) 53 | rm -rf $(WORK_DIR) 54 | 55 | clean: clean-dirs 56 | $(CARGO) clean 57 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/Makefile: -------------------------------------------------------------------------------- 1 | CODESIGN := codesign 2 | CARGO := cargo +nightly 3 | 4 | FUZZER := upng_fuzzer 5 | FUZZER_RELEASE := target/release/$(FUZZER) 6 | 7 | TARGET_DIR := $(PWD)/bin 8 | TARGET_SRC_DIR := $(TARGET_DIR)/src 9 | TARGET_PROGRAM := $(TARGET_DIR)/upng 10 | INIT_CORPUS_DIR := ./corpus 11 | TMP_DIR := ./tmp 12 | CORPUS_DIR := "$(TMP_DIR)/corpus" 13 | WORK_DIR := "$(TMP_DIR)/work" 14 | TRACE_FILE := $(TMP_DIR)/trace.txt 15 | 16 | .DEFAULT_GOAL := run 17 | .PHONY: check 18 | 19 | build-target: 20 | NDK_PATH=$(NDK_PATH) TARGET_DIR=$(TARGET_DIR) $(MAKE) -C $(TARGET_SRC_DIR) build 21 | 22 | clean-target: 23 | TARGET_DIR=$(TARGET_DIR) $(MAKE) -C $(TARGET_SRC_DIR) clean 24 | 25 | build: 26 | $(CARGO) fmt 27 | $(CARGO) clippy 28 | $(CARGO) build --release 29 | $(CODESIGN) --sign - --entitlements entitlements.xml --deep --force "$(FUZZER_RELEASE)" 30 | 31 | run: build 32 | mkdir -p $(CORPUS_DIR) 33 | mkdir -p $(WORK_DIR) 34 | cp $(INIT_CORPUS_DIR)/* $(CORPUS_DIR) 35 | $(FUZZER_RELEASE) fuzz \ 36 | --binary $(TARGET_PROGRAM) \ 37 | --corpus $(CORPUS_DIR) \ 38 | --size 0x10000000 \ 39 | --workdir $(WORK_DIR) \ 40 | --workers 4 \ 41 | ; 42 | 43 | trace: build 44 | mkdir -p $(TMP_DIR) 45 | $(FUZZER_RELEASE) trace \ 46 | --binary $(TARGET_PROGRAM) \ 47 | --size 0x10000000 \ 48 | --trace $(TRACE_FILE) \ 49 | --testcase $(filter-out $@,$(MAKECMDGOALS)) \ 50 | ; 51 | 52 | check: 53 | TARGET_DIR=$(TARGET_DIR) $(MAKE) -C $(TARGET_SRC_DIR) check $(PWD)/$(filter-out $@,$(MAKECMDGOALS)) 54 | 55 | clean-dirs: 56 | rm -rf $(CORPUS_DIR) 57 | rm -rf $(WORK_DIR) 58 | 59 | clean: clean-dirs clean-target 60 | $(CARGO) clean 61 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/upng.h: -------------------------------------------------------------------------------- 1 | /* 2 | uPNG -- derived from LodePNG version 20100808 3 | 4 | Copyright (c) 2005-2010 Lode Vandevenne 5 | Copyright (c) 2010 Sean Middleditch 6 | 7 | This software is provided 'as-is', without any express or implied 8 | warranty. In no event will the authors be held liable for any damages 9 | arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, 12 | including commercial applications, and to alter it and redistribute it 13 | freely, subject to the following restrictions: 14 | 15 | 1. The origin of this software must not be misrepresented; you must not 16 | claim that you wrote the original software. If you use this software 17 | in a product, an acknowledgment in the product documentation would be 18 | appreciated but is not required. 19 | 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 23 | 3. This notice may not be removed or altered from any source 24 | distribution. 25 | */ 26 | 27 | #if !defined(UPNG_H) 28 | #define UPNG_H 29 | 30 | typedef enum upng_error { 31 | UPNG_EOK = 0, /* success (no error) */ 32 | UPNG_ENOMEM = 1, /* memory allocation failed */ 33 | UPNG_ENOTFOUND = 2, /* resource not found (file missing) */ 34 | UPNG_ENOTPNG = 3, /* image data does not have a PNG header */ 35 | UPNG_EMALFORMED = 4, /* image data is not a valid PNG image */ 36 | UPNG_EUNSUPPORTED = 5, /* critical PNG chunk type is not supported */ 37 | UPNG_EUNINTERLACED = 6, /* image interlacing is not supported */ 38 | UPNG_EUNFORMAT = 7, /* image color format is not supported */ 39 | UPNG_EPARAM = 8 /* invalid parameter to method call */ 40 | } upng_error; 41 | 42 | typedef enum upng_format { 43 | UPNG_BADFORMAT, 44 | UPNG_RGB8, 45 | UPNG_RGB16, 46 | UPNG_RGBA8, 47 | UPNG_RGBA16, 48 | UPNG_LUMINANCE1, 49 | UPNG_LUMINANCE2, 50 | UPNG_LUMINANCE4, 51 | UPNG_LUMINANCE8, 52 | UPNG_LUMINANCE_ALPHA1, 53 | UPNG_LUMINANCE_ALPHA2, 54 | UPNG_LUMINANCE_ALPHA4, 55 | UPNG_LUMINANCE_ALPHA8 56 | } upng_format; 57 | 58 | typedef struct upng_t upng_t; 59 | 60 | upng_t* upng_new_from_bytes (const unsigned char* buffer, unsigned long size); 61 | upng_t* upng_new_from_file (const char* path); 62 | void upng_free (upng_t* upng); 63 | 64 | upng_error upng_header (upng_t* upng); 65 | upng_error upng_decode (upng_t* upng); 66 | 67 | upng_error upng_get_error (const upng_t* upng); 68 | unsigned upng_get_error_line (const upng_t* upng); 69 | 70 | unsigned upng_get_width (const upng_t* upng); 71 | unsigned upng_get_height (const upng_t* upng); 72 | unsigned upng_get_bpp (const upng_t* upng); 73 | unsigned upng_get_bitdepth (const upng_t* upng); 74 | unsigned upng_get_components (const upng_t* upng); 75 | unsigned upng_get_pixelsize (const upng_t* upng); 76 | upng_format upng_get_format (const upng_t* upng); 77 | 78 | const unsigned char* upng_get_buffer (const upng_t* upng); 79 | unsigned upng_get_size (const upng_t* upng); 80 | 81 | #endif /*defined(UPNG_H)*/ 82 | -------------------------------------------------------------------------------- /examples/simple_fuzzer/README.md: -------------------------------------------------------------------------------- 1 | # Simple Fuzzer 2 | 3 | This example targets the C program found at [`bin/simple_program.c`](bin/simple_program.c). 4 | 5 | **Note:** it is not recommended to recompile this program as it might change the symbols' offset and break the fuzzer. If you need to recompile it, you'll need to change the offsets in the `symbols` method in [`src/main.rs`](src/main.rs). 6 | 7 | ## Running the Program 8 | 9 | The `Makefile` provided performs multiple operations detailed below. 10 | 11 | * `build-target`: builds the C program. 12 | * `clean-target`: cleans the `bin` directory. 13 | * `build`: builds the fuzzer and the target. 14 | * `run`: builds the binaries, creates a corpus directory at `./tmp/corpus`, a working directory at `./tmp/work` and then runs the fuzzer. 15 | * `clean-dirs`: removes the temporary directories `./tmp/corpus` and `./tmp/work`. 16 | * `clean`: cleans the target, the fuzzer and the temporary directories. 17 | 18 | To run the program you can simply do: 19 | 20 | ``` 21 | make run 22 | ``` 23 | 24 | If everything went as expected, the program should crash after a minute or two: 25 | 26 | ``` 27 | Loading corpus... 28 | Corpus loaded! 29 | [00:00:52] #: 8658541 - Execs/s: 166510 - Paths: 50 - Crashes: 100 (1 uniques) - Timeouts: 0 30 | ``` 31 | 32 | And we should get the following crash: 33 | 34 | ```console 35 | $ cat tmp/work/worker_0*/crashes/*.info 36 | 37 | Synchronous Exception from Lower EL using AArch64 38 | ================================================= 39 | 40 | Crash Reason 41 | ------------ 42 | 43 | EXCEPTION => [syndrome: 000000005a000008, virtual addr: 0000000000000000, physical addr: 0000000000000000] 44 | 45 | 46 | Virtual CPU State 47 | ----------------- 48 | 49 | EL0: 50 | X0: 0000000000000000 X1: 0000000000101004 X2: 0000000000000000 X3: 0000000000000000 51 | X4: 0000000000000000 X5: 0000000000000000 X6: 0000000000000000 X7: 0000000000000000 52 | X8: 00000000cafec0c0 X9: deadbeefdeadbeef X10: 0000000000101000 X11: 0000000000000000 53 | X12: 00000000deadbeef X13: 0000000000000000 X14: 0000000000000000 X15: 0000000000000000 54 | X16: 0000000000000000 X17: 0000000000000000 X18: 0000000000000000 X19: 0000000000000000 55 | X20: 0000000000000000 X21: 0000000000000000 X22: 0000000000000000 X23: 0000000000000000 56 | X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000 X27: 0000000000000000 57 | X28: 0000000000000000 X29: 0000000000000000 LR: 000000000010022c PC: ffffffffffff0404 58 | SP: 00000000ffffffd0 59 | EL1: 60 | SCTLR: 0000000030101185 SP: fffffffffffe1000 61 | CPSR: 00000000604003c5 SPSR: 00000000600003c0 62 | FAR: deadbeefdeadbeef PAR: 0000000000000800 63 | ESR: 0000000092000044 ELR: 0000000000100254 64 | 65 | 66 | Backtrace 67 | --------- 68 | 69 | simple_program process+0xd4/0xec [0x100254] 70 | ``` 71 | 72 | ```console 73 | $ ls tmp/work/worker_0*/crashes/* | grep -v info | xargs xxd 74 | 00000000: 696d 7061 6c61 6273 696d 7061 6c61 6273 impalabsimpalabs 75 | 00000010: 696d 7061 6c61 6273 0000 0000 5b5b impalabs....[[ 76 | ``` 77 | -------------------------------------------------------------------------------- /src/tracer.rs: -------------------------------------------------------------------------------- 1 | //! Handles everything related to instruction tracing. 2 | 3 | use crate::core::*; 4 | use crate::crash::*; 5 | use crate::error::*; 6 | use crate::hooks::*; 7 | 8 | /// A range of virtual addresses where tracing is applied. Arguments are the range's start and 9 | /// end address. 10 | #[derive(Clone, Eq, PartialEq, Hash, Debug)] 11 | pub struct TraceRange(pub(crate) std::ops::Range); 12 | 13 | impl TraceRange { 14 | /// Creates a new tracing range. 15 | /// 16 | /// This structure is instanciated by the [`crate::loader::Loader`] in 17 | /// [`crate::loader::Loader::trace_ranges`] to specify which virtual address ranges tracing 18 | /// should be applied to. We can't just instrument everything, because of data sections 19 | /// found in code ranges that could be interpreted as instructions. The onus is on the user to 20 | /// identify which ranges are actual code ranges. 21 | pub fn new(start: u64, end: u64) -> Self { 22 | Self(start..end) 23 | } 24 | } 25 | 26 | /// Structure that defines hooks handling instruction tracing operations. 27 | /// 28 | /// # Role of Tracing in the Fuzzer 29 | /// 30 | /// Tracing systems usually display or store all the instructions executed during a given test-run. 31 | /// This system is not directly used by the fuzzer, but it can be a really helpful debugging tool 32 | /// to analyze a crash or understand why the fuzzer is not behaving as it should (e.g. observing 33 | /// where a fuzzer is stuck, understanding why it's not producing new paths anymore, etc.). 34 | /// 35 | /// # Tracing Implementation 36 | /// 37 | /// The current implementation is extremely primitive. It hooks all instructions found in the 38 | /// user-defined [`TraceRange`] with [`Tracer::hook`]. This hook simply displays in `stdout` the 39 | /// instruction currently executed. 40 | /// 41 | /// Future versions could include output to known trace formats (gcov, tenet, etc.) to have a more 42 | /// efficient and user-friendly way of analyzing traces. 43 | pub struct Tracer; 44 | 45 | impl Tracer { 46 | /// Adds tracing hooks to the fuzzed program. 47 | pub fn add_hooks( 48 | ranges: Vec, 49 | hook: Option>, 50 | hooks: &mut Hooks, 51 | ) -> Result<()> { 52 | let hook = if let Some(tracer_hook) = hook { 53 | tracer_hook 54 | } else { 55 | Tracer::hook 56 | }; 57 | for TraceRange(range) in ranges.into_iter() { 58 | for addr in range.step_by(4) { 59 | hooks.add_tracer_hook(addr, hook); 60 | } 61 | } 62 | Ok(()) 63 | } 64 | 65 | /// Handles tracing hooks and displays the current instruction to `stdout`. 66 | pub fn hook(args: &mut HookArgs) -> Result { 67 | CSE.with(|cs| { 68 | let insns = cs 69 | .disasm_count(args.insn, args.addr, 1) 70 | .expect("could not disassemble while adding coverage hooks"); 71 | let insn = insns.as_ref().first().unwrap(); 72 | println!("{}", insn); 73 | }); 74 | Ok(ExitKind::Continue) 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /examples/simple_fuzzer/bin/simple_program.c: -------------------------------------------------------------------------------- 1 | #define MAGIC_VALUE 0xdeadbeef 2 | #define INIT_STATE 0x0bad0d0e 3 | 4 | /* Global state variable. */ 5 | int g_state = 0; 6 | char g_magic_string[0x11]; 7 | 8 | void init(int magic); 9 | int sum(char* buffer, unsigned int size); 10 | int process(char* buffer, unsigned int size); 11 | unsigned int strlen(const char *str); 12 | int strcmp(const char *s1, const char *s2); 13 | unsigned long hex2long(const char *str); 14 | 15 | /* The main function. */ 16 | int main(int argc, char *argv[]) { 17 | if (argc < 3) 18 | return -1; 19 | 20 | /* 21 | * Converts the first argument into a number from an hexadecimal 22 | * representation. 23 | */ 24 | unsigned int magic = hex2long(argv[1]); 25 | init(magic); 26 | 27 | /* Retrieves information about the buffer and calls the process function. */ 28 | char* buffer = argv[2]; 29 | unsigned int size = strlen(buffer); 30 | return process(buffer, size); 31 | } 32 | 33 | /* Sets the global state variable to the initial state value. */ 34 | void init(int magic) { 35 | /* 36 | * The argument should be equal to the expected magic value. 37 | * This is mostly an excuse to show how a function can be called from the 38 | * fuzzer using arbitrary arguments. 39 | */ 40 | g_state = (magic == MAGIC_VALUE) ? INIT_STATE : 0; 41 | 42 | /* 43 | * The global magic string is initialized in this function so we don't need 44 | * to care about loading the string from the binary's data section. 45 | */ 46 | *(unsigned long*)g_magic_string = 0x7362616c61706d69; 47 | *(unsigned long*)(g_magic_string + 8) = 0x7362616c61706d69; 48 | g_magic_string[0x10] = 0; 49 | } 50 | 51 | /* Computes the sum of the bytes in `buffer`. */ 52 | int sum(char* buffer, unsigned int size) { 53 | int sum = 0; 54 | for (int i = 0; i < size; i++) { 55 | sum += buffer[i]; 56 | } 57 | return sum; 58 | } 59 | 60 | /* Processes the user input */ 61 | int process(char* buffer, unsigned int size) { 62 | /* Returns if we're not currently in the initialization state */ 63 | if (g_state != INIT_STATE) 64 | return -2; 65 | 66 | /* Checks that the input is big enough. */ 67 | if (size <= 24) 68 | return -3; 69 | 70 | /* 71 | * Pre-check verifying that the sum of the input is the expected one 72 | * before proceeding further. These types of functions can be arbitrarily 73 | * hard to pass while fuzzing, so it's better to just place a hook that 74 | * returns the correct value and ignore them. 75 | */ 76 | if (sum(buffer, size) != 0x9db) 77 | return -4; 78 | 79 | /* Verifies that the buffer starts with the expected input. */ 80 | if (*(unsigned long*)buffer != 0x7362616c61706d69) 81 | return -5; 82 | 83 | /* Verifies that the buffer contains the rest of the string. */ 84 | if (strcmp(buffer + 8, g_magic_string)) 85 | return -6; 86 | 87 | /* If we managed to reach this point, crash the program. */ 88 | *(unsigned long*)0xdeadbeefdeadbeef = 0xcafec0c0; 89 | 90 | return 0; 91 | } 92 | 93 | /* strlen implementation */ 94 | unsigned int strlen(const char *str) { 95 | const char *s = str; 96 | while (*s++); 97 | return (s - str); 98 | } 99 | 100 | /* strcmp implementation */ 101 | int strcmp(const char *s1, const char *s2) { 102 | unsigned char c1, c2; 103 | do { 104 | c1 = *s1++; 105 | c2 = *s2++; 106 | if (c1 == 0) 107 | return c1 - c2; 108 | } while (c1 == c2); 109 | return c1 - c2; 110 | } 111 | 112 | /* 113 | * Converts a string that contains an hexadecimal representation of a number 114 | * into a 64-bit integer. 115 | * Equivalent to strtol(str, 0, 16). 116 | */ 117 | unsigned long hex2long(const char *str) { 118 | unsigned long res = 0; 119 | char c; 120 | while ((c = *str++)) { 121 | char v = (c & 0xF) + (c >> 6) | ((c >> 3) & 0x8); 122 | res = (res << 4) | (unsigned long) v; 123 | } 124 | return res; 125 | } -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/glview.c: -------------------------------------------------------------------------------- 1 | #include 2 | #ifdef __APPLE__ 3 | #include 4 | #else 5 | #include 6 | #endif 7 | #include 8 | #include 9 | 10 | #include "upng.h" 11 | 12 | static GLuint checkboard(unsigned w, unsigned h) { 13 | unsigned char* buffer; 14 | unsigned x, y, xc = 0; 15 | char dark = 0; 16 | GLuint texture; 17 | 18 | buffer = (unsigned char*)calloc(w * h, 3); 19 | 20 | for (y = 0; y != h; ++y) { 21 | for (x = 0; x != w; ++x, ++xc) { 22 | if ((xc % (w >> 3)) == 0) { 23 | dark = 1 - dark; 24 | } 25 | 26 | if (dark) { 27 | buffer[y * w * 3 + x * 3 + 0] = 0x6F; 28 | buffer[y * w * 3 + x * 3 + 1] = 0x6F; 29 | buffer[y * w * 3 + x * 3 + 2] = 0x6F; 30 | } else { 31 | buffer[y * w * 3 + x * 3 + 0] = 0xAF; 32 | buffer[y * w * 3 + x * 3 + 1] = 0xAF; 33 | buffer[y * w * 3 + x * 3 + 2] = 0xAF; 34 | } 35 | } 36 | 37 | if ((y % (h >> 3)) == 0) { 38 | dark = 1 - dark; 39 | } 40 | } 41 | 42 | glEnable(GL_TEXTURE_2D); 43 | glGenTextures(1, &texture); 44 | glBindTexture(GL_TEXTURE_2D, texture); 45 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 46 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 47 | glTexImage2D(GL_TEXTURE_2D, 0, 3, w, h, 0, GL_RGB, GL_UNSIGNED_BYTE, buffer); 48 | 49 | free(buffer); 50 | 51 | return texture; 52 | } 53 | 54 | int main(int argc, char** argv) { 55 | SDL_Event event; 56 | upng_t* upng; 57 | GLuint texture, cb; 58 | 59 | if (argc <= 1) { 60 | return 0; 61 | } 62 | 63 | upng = upng_new_from_file(argv[1]); 64 | upng_decode(upng); 65 | if (upng_get_error(upng) != UPNG_EOK) { 66 | printf("error: %u %u\n", upng_get_error(upng), upng_get_error_line(upng)); 67 | return 0; 68 | } 69 | 70 | SDL_Init(SDL_INIT_VIDEO); 71 | SDL_SetVideoMode(upng_get_width(upng), upng_get_height(upng), 0, SDL_OPENGL|SDL_DOUBLEBUF); 72 | 73 | glDisable(GL_DEPTH_TEST); 74 | glDisable(GL_CULL_FACE); 75 | glEnable(GL_BLEND); 76 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 77 | glClearColor(0.f, 0.f, 0.f, 0.f); 78 | 79 | glMatrixMode(GL_PROJECTION); 80 | glLoadIdentity(); 81 | glOrtho(0, 1, 0, 1, 0, 1); 82 | 83 | glMatrixMode(GL_MODELVIEW); 84 | glLoadIdentity(); 85 | 86 | cb = checkboard(upng_get_width(upng), upng_get_height(upng)); 87 | 88 | glEnable(GL_TEXTURE_2D); 89 | glGenTextures(1, &texture); 90 | glBindTexture(GL_TEXTURE_2D, texture); 91 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 92 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); 93 | 94 | switch (upng_get_components(upng)) { 95 | case 1: 96 | glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, upng_get_width(upng), upng_get_height(upng), 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, upng_get_buffer(upng)); 97 | break; 98 | case 2: 99 | glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, upng_get_width(upng), upng_get_height(upng), 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, upng_get_buffer(upng)); 100 | break; 101 | case 3: 102 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, upng_get_width(upng), upng_get_height(upng), 0, GL_RGB, GL_UNSIGNED_BYTE, upng_get_buffer(upng)); 103 | break; 104 | case 4: 105 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, upng_get_width(upng), upng_get_height(upng), 0, GL_RGBA, GL_UNSIGNED_BYTE, upng_get_buffer(upng)); 106 | break; 107 | default: 108 | return 1; 109 | } 110 | 111 | upng_free(upng); 112 | 113 | while (SDL_WaitEvent(&event)) { 114 | if (event.type == SDL_QUIT) { 115 | break; 116 | } 117 | 118 | glClear(GL_COLOR_BUFFER_BIT); 119 | 120 | glBindTexture(GL_TEXTURE_2D, cb); 121 | glBegin(GL_QUADS); 122 | glTexCoord2f(0.f, 1.f); 123 | glVertex2f(0.f, 0.f); 124 | 125 | glTexCoord2f(0.f, 0.f); 126 | glVertex2f(0.f, 1.f); 127 | 128 | glTexCoord2f(1.f, 0.f); 129 | glVertex2f(1.f, 1.f); 130 | 131 | glTexCoord2f(1.f, 1.f); 132 | glVertex2f(1.f, 0.f); 133 | glEnd(); 134 | 135 | glBindTexture(GL_TEXTURE_2D, texture); 136 | glBegin(GL_QUADS); 137 | glTexCoord2f(0.f, 1.f); 138 | glVertex2f(0.f, 0.f); 139 | 140 | glTexCoord2f(0.f, 0.f); 141 | glVertex2f(0.f, 1.f); 142 | 143 | glTexCoord2f(1.f, 0.f); 144 | glVertex2f(1.f, 1.f); 145 | 146 | glTexCoord2f(1.f, 1.f); 147 | glVertex2f(1.f, 0.f); 148 | glEnd(); 149 | 150 | SDL_GL_SwapBuffers(); 151 | } 152 | 153 | glDeleteTextures(1, &texture); 154 | glDeleteTextures(1, &cb); 155 | SDL_Quit(); 156 | return 0; 157 | } 158 | -------------------------------------------------------------------------------- /examples/simple_executor/src/main.rs: -------------------------------------------------------------------------------- 1 | use hyperpom::applevisor as av; 2 | use hyperpom::config::*; 3 | use hyperpom::core::*; 4 | use hyperpom::corpus::*; 5 | use hyperpom::coverage::*; 6 | use hyperpom::crash::*; 7 | use hyperpom::error::*; 8 | use hyperpom::loader::*; 9 | use hyperpom::memory::*; 10 | use hyperpom::tracer::*; 11 | use hyperpom::utils::*; 12 | use hyperpom::*; 13 | 14 | // Empty global data. 15 | #[derive(Clone)] 16 | pub struct GlobalData; 17 | // Empty local data. 18 | #[derive(Clone)] 19 | pub struct LocalData; 20 | 21 | // A simple loader that maps a binary at virtual address `0x100000`. 22 | #[derive(Clone)] 23 | pub struct SimpleLoader { 24 | binary: Vec, 25 | entry_point: u64, 26 | } 27 | 28 | impl SimpleLoader { 29 | // Creates a new SimpleLoader object. 30 | fn new(binary: &[u8]) -> Result { 31 | Ok(Self { 32 | binary: binary.to_vec(), 33 | entry_point: 0x100000, 34 | }) 35 | } 36 | } 37 | 38 | impl Loader for SimpleLoader { 39 | type LD = LocalData; 40 | type GD = GlobalData; 41 | 42 | // Creates the mapping needed for the binary and writes the instructions into it. 43 | fn map(&mut self, executor: &mut Executor) -> Result<()> { 44 | executor.vma.map( 45 | self.entry_point, 46 | round_virt_page!(self.binary.len()) as usize, 47 | av::MemPerms::RX, 48 | )?; 49 | executor.vma.write(self.entry_point, &self.binary)?; 50 | Ok(()) 51 | } 52 | 53 | // Sets PC to the entry point. 54 | fn pre_exec(&mut self, executor: &mut Executor) -> Result { 55 | executor.vcpu.set_reg(av::Reg::PC, self.entry_point)?; 56 | Ok(ExitKind::Continue) 57 | } 58 | 59 | // Unused 60 | fn load_testcase( 61 | &mut self, 62 | _executor: &mut Executor, 63 | _testcase: &[u8], 64 | ) -> Result { 65 | Ok(LoadTestcaseAction::NewAndReset) 66 | } 67 | 68 | // Unused 69 | fn symbols(&self) -> Result { 70 | Ok(Symbols::new()) 71 | } 72 | 73 | // Unused 74 | fn code_ranges(&self) -> Result> { 75 | Ok(vec![]) 76 | } 77 | 78 | // Unused 79 | fn coverage_ranges(&self) -> Result> { 80 | Ok(vec![]) 81 | } 82 | 83 | // Unused 84 | fn trace_ranges(&self) -> Result> { 85 | Ok(vec![]) 86 | } 87 | } 88 | 89 | fn main() { 90 | // Creates the virtual machine instance needed to access the hypervisor features. 91 | // This is handled automatically when fuzzing, but needs to be done manually when using an 92 | // Executor. 93 | let _vm = av::VirtualMachine::new(); 94 | // Unused, but necessary global and local data structures. 95 | let gdata = GlobalData; 96 | let ldata = LocalData; 97 | // Test binary 98 | let asm = String::from( 99 | "mov x0, #0x10 100 | mov x1, 4 101 | mul x0, x0, x1 102 | add x0, x0, 2 103 | ret", 104 | ); 105 | // Assembled using the `KSE` keystone engine instance provided by Hyperpom. 106 | let binary = KSE.with(|ks| ks.asm(asm, 0).expect("could not assemble")); 107 | // Instanciates the test loader with our assembled instructions. 108 | let loader = SimpleLoader::new(&binary.bytes).expect("could not create loader"); 109 | // Builds a default configuration for the executor with an address space size of, at most, 110 | // 0x10000000 bytes. 111 | let config = ExecConfig::builder(0x10000000).build(); 112 | // Instanciates the executor with the values above. 113 | let mut executor = 114 | Executor::<_, _, _>::new(config, loader, ldata, gdata).expect("could not create executor"); 115 | // Initializes the executor's address space and registers. 116 | // This is handled automatically when fuzzing, but needs to be done manually when using an 117 | // Executor. 118 | executor.init().expect("could not init executor"); 119 | // Runs the executor. It will stop automatically when the `ret` instruction is executed. 120 | executor.run(None).expect("execution failed"); 121 | // Makes sure that we obtained the expected result of 0x42. 122 | println!("X0 = {:#x}", executor.vcpu.get_reg(av::Reg::X0).unwrap()); 123 | assert_eq!(executor.vcpu.get_reg(av::Reg::X0), Ok(0x42)); 124 | } 125 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/src/stubs.rs: -------------------------------------------------------------------------------- 1 | use applevisor as av; 2 | use hyperpom::crash::*; 3 | use hyperpom::error::*; 4 | use hyperpom::hooks::*; 5 | use hyperpom::memory::*; 6 | use hyperpom::*; 7 | 8 | use crate::loader::*; 9 | 10 | pub struct Stub; 11 | 12 | impl Stub { 13 | // ------------------------------------------------------------------------------------------- 14 | // Helper functions 15 | 16 | fn ret(vcpu: &mut av::Vcpu) -> Result { 17 | vcpu.set_reg(av::Reg::X0, 0)?; 18 | let lr = vcpu.get_reg(av::Reg::LR)?; 19 | vcpu.set_reg(av::Reg::PC, lr)?; 20 | Ok(ExitKind::EarlyFunctionReturn) 21 | } 22 | 23 | fn retval(vcpu: &mut av::Vcpu, value: u64) -> Result { 24 | vcpu.set_reg(av::Reg::X0, value)?; 25 | let lr = vcpu.get_reg(av::Reg::LR)?; 26 | vcpu.set_reg(av::Reg::PC, lr)?; 27 | Ok(ExitKind::EarlyFunctionReturn) 28 | } 29 | 30 | // ------------------------------------------------------------------------------------------- 31 | // Heap 32 | 33 | /// Allocates a new heap chunk of `size` bytes. 34 | fn allocate( 35 | ldata: &mut LocalData, 36 | _vcpu: &mut av::Vcpu, 37 | vma: &mut VirtMemAllocator, 38 | size: usize, 39 | ) -> Result> { 40 | if size > 0x100000 { 41 | return Ok(None); 42 | } 43 | // Minimal size for 0-byte allocations. 44 | let size = if size == 0 { 8 } else { size }; 45 | // Computes the remaining size in the heap. 46 | let remaining_size = ldata.heap_size - ldata.heap_offset; 47 | // If the allocation we want to perform exceeds it, we map a new page right after. 48 | if remaining_size < size { 49 | let next_addr = round_virt_page!(PngLoader::HEAP_ADDR + ldata.heap_offset as u64); 50 | let next_size = round_virt_page!((size - remaining_size) as u64) as usize; 51 | let ret = vma.map(next_addr, next_size, av::MemPerms::RW); 52 | // If any error occurs while mapping the new heap page, we just return nothing from 53 | // this function. Propagating the error would stop the fuzzer and resetting the 54 | // fuzzer during the next iteration should be enough to recover from it. 55 | if ret.is_err() { 56 | return Ok(None); 57 | } 58 | vma.write(next_addr, &vec![0; next_size])?; 59 | ldata.heap_size += next_size; 60 | } 61 | let addr = PngLoader::HEAP_ADDR + ldata.heap_offset as u64; 62 | ldata.allocs.insert(addr, size); 63 | ldata.heap_offset += size; 64 | Ok(Some(addr)) 65 | } 66 | 67 | /// Stub for the `malloc` function. 68 | pub fn malloc(args: &mut HookArgs) -> Result { 69 | let size = args.vcpu.get_reg(av::Reg::X0)?; 70 | if let Some(addr) = Self::allocate(args.ldata, args.vcpu, args.vma, size as usize)? { 71 | Self::retval(args.vcpu, addr) 72 | } else { 73 | Self::retval(args.vcpu, 0) 74 | } 75 | } 76 | 77 | /// Stub for the `free` function. 78 | /// 79 | /// Doesn't actually do anything. Allocating linearly and letting the snapshot restoration 80 | /// system handle memory unmapping should be enough for this target. 81 | pub fn free(args: &mut HookArgs) -> Result { 82 | Self::ret(args.vcpu) 83 | } 84 | 85 | /// Stub for the `realloc` function. 86 | pub fn realloc(args: &mut HookArgs) -> Result { 87 | let old_mem = args.vcpu.get_reg(av::Reg::X0)?; 88 | let new_size = args.vcpu.get_reg(av::Reg::X1)?; 89 | let new_addr = 90 | if let Some(old_size) = args.ldata.allocs.get(&old_mem) { 91 | let mut data = vec![0u8; *old_size]; 92 | args.vma.read(old_mem, &mut data)?; 93 | if let Some(addr) = 94 | Self::allocate(args.ldata, args.vcpu, args.vma, new_size as usize)? 95 | { 96 | args.vma.write(addr, &data)?; 97 | addr 98 | } else { 99 | 0 100 | } 101 | } else if let Some(addr) = 102 | Self::allocate(args.ldata, args.vcpu, args.vma, new_size as usize)? 103 | { 104 | addr 105 | } else { 106 | 0 107 | }; 108 | Self::retval(args.vcpu, new_addr) 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/crash.rs: -------------------------------------------------------------------------------- 1 | //! Methods to create crash files after a crash or a timeout occured. 2 | 3 | use std::fs; 4 | use std::io::Write as IoWrite; 5 | use std::path::{Path, PathBuf}; 6 | 7 | use time; 8 | 9 | use crate::core::Executor; 10 | use crate::corpus::*; 11 | use crate::error::*; 12 | use crate::loader::*; 13 | use crate::utils::*; 14 | 15 | /// Represents the type of exit can be returned after the execution of a testcase. 16 | #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] 17 | pub enum ExitKind { 18 | /// Resumes the execution after an exception occured and was handled. 19 | Continue, 20 | /// The execution continues, but we signaled that we returned early from the function 21 | /// (kind of a hack to update the backtrace even if we didn't execute the return instruction). 22 | EarlyFunctionReturn, 23 | /// An exception occured and resulted in a crash. Stores the title of the crash report. 24 | Crash(String), 25 | /// The execution timed out. 26 | Timeout, 27 | /// The program exited normally. 28 | Exit, 29 | } 30 | 31 | /// Structure handling crashes 32 | /// 33 | /// # Role of the Crash Handler in the Fuzzer 34 | /// 35 | /// The crash handler does not do much apart from creating a crash files after the targeted program 36 | /// crashed or timed out. It retrieves the corresponding testcase as well as information from the 37 | /// fuzzing worker and creates a file that contains: 38 | /// 39 | /// * the crash reason (which is currently just the exception type); 40 | /// * the state of the virtual CPU when the crash happened; 41 | /// * the backtrace; 42 | /// * an hexadecimal dump of the testcase. 43 | /// 44 | /// An additional file that only contains the testcase is also created. 45 | /// 46 | /// Crashes and timeouts are stored using [`CrashHandler::store_crash`]. 47 | pub struct CrashHandler { 48 | /// The path to the crash directory. 49 | path: PathBuf, 50 | /// Random generator used to generate filenames. 51 | rand: Random, 52 | } 53 | 54 | impl CrashHandler { 55 | /// Creates a new crash handler. 56 | pub fn new(path: impl AsRef, rand: Random) -> Result { 57 | fs::create_dir_all(&path)?; 58 | Ok(Self { 59 | path: path.as_ref().to_owned(), 60 | rand, 61 | }) 62 | } 63 | 64 | /// Generates random filepaths in the crash directory for the crash information file and the 65 | /// testcase that resulted in a crash. 66 | fn crash_filepath(&mut self) -> (PathBuf, PathBuf) { 67 | let fmt = 68 | time::format_description::parse("[year][month][day]-[hour][minute][second]").unwrap(); 69 | let path = self.path.join(PathBuf::from(format!( 70 | "crash_{}_{}", 71 | time::OffsetDateTime::now_utc().format(&fmt).unwrap(), 72 | self.rand.str(10), 73 | ))); 74 | let mut path_info = path.clone(); 75 | path_info.set_extension("info"); 76 | (path, path_info) 77 | } 78 | 79 | /// Generates random filepaths in the crash directory for the timeout information file and the 80 | /// testcase that resulted in a timeout. 81 | fn timeout_filepath(&mut self) -> (PathBuf, PathBuf) { 82 | let fmt = 83 | time::format_description::parse("[year][month][day]-[hour][minute][second]").unwrap(); 84 | let path = self.path.join(PathBuf::from(format!( 85 | "timeout_{}_{}", 86 | time::OffsetDateTime::now_utc().format(&fmt).unwrap(), 87 | self.rand.str(10), 88 | ))); 89 | let mut path_info = path.clone(); 90 | path_info.set_extension("info"); 91 | (path, path_info) 92 | } 93 | 94 | /// Stores in the crash directory a crash information file and the testcase that resulted in 95 | /// a crash. 96 | pub fn store_crash + Loader, LD: Clone, GD: Clone>( 97 | &mut self, 98 | loader: &L, 99 | title: &str, 100 | tc: &Testcase, 101 | executor: &Executor, 102 | is_timeout: bool, 103 | ) -> Result<()> { 104 | // Generates filepaths for the resulting files. 105 | let (filepath, filepath_info) = if is_timeout { 106 | self.crash_filepath() 107 | } else { 108 | self.timeout_filepath() 109 | }; 110 | // Opens the crash information file. 111 | let mut crash_info = fs::OpenOptions::new() 112 | .write(true) 113 | .create(true) 114 | .open(filepath_info)?; 115 | let crash_str = loader.format_crash(title, tc, executor, is_timeout)?; 116 | crash_info.write_all(crash_str.as_bytes())?; 117 | // Opens the testcase crash file. 118 | let mut crash = fs::OpenOptions::new() 119 | .write(true) 120 | .create(true) 121 | .open(filepath)?; 122 | // Writes the testcase into it. 123 | crash.write_all(tc.get_data())?; 124 | Ok(()) 125 | } 126 | } 127 | 128 | #[cfg(test)] 129 | mod tests { 130 | use super::*; 131 | 132 | #[test] 133 | fn crash_filepath() { 134 | let mut rand = Random::new(1); 135 | let mut handler = CrashHandler::new("/tmp/crashes/", rand.split()).unwrap(); 136 | println!("{:?}", handler.crash_filepath()); 137 | println!("{:?}", handler.timeout_filepath()); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /src/backtrace.rs: -------------------------------------------------------------------------------- 1 | //! Handles everything related to backtrace generation. 2 | 3 | use crate::core::*; 4 | use crate::coverage::*; 5 | use crate::crash::*; 6 | use crate::error::*; 7 | use crate::hooks::*; 8 | use crate::memory::*; 9 | 10 | /// Contains backtrace information for one testcase executed by one worker. 11 | /// 12 | /// # Backtrace 13 | /// 14 | /// When a crash occurs, it's useful to get a backtrace to observe the path taken by our input. 15 | /// Hooks are place so that everytime a `bl` or `blr` instruction occurs, [`Backtrace::hook_in`] 16 | /// is called and we push the current address to a vector. When we reach a `ret` instruction, 17 | /// [`Backtrace::hook_out`] pops the latest one added. If the program crashes, the addresses stored 18 | /// in the vector will be used to form a backtrace, as shown below. 19 | /// 20 | /// ```text 21 | /// Backtrace 22 | /// --------- 23 | /// 24 | /// main+0x14/0x28 25 | /// func0+0x20/0x30 26 | /// func1+0x20/0x30 27 | /// func2+0x20/0x30 28 | /// func3+0x1c/0x2c 29 | /// func4+0x10/0x18 30 | /// ``` 31 | /// 32 | /// *Note:* symbolized backtraces are produced when implementing [`crate::loader::Loader::symbols`] 33 | /// from the [`crate::loader::Loader`]. 34 | #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)] 35 | pub struct Backtrace { 36 | /// Vector that represents the backtrace and acts as a stack. The earliest stack frame we're in 37 | /// is at the beginning, while the latest is at the end. Entering and leaving functions 38 | /// results, respectively, in the return address being pushed in and popped out. 39 | pub backtrace: Vec, 40 | } 41 | 42 | impl Backtrace { 43 | /// Instructions updating the backtrace. 44 | const BT_INSNS: &'static [&'static str] = &["bl", "blr"]; 45 | 46 | /// Instanciates a new structure containing backtrace information. 47 | pub fn new() -> Self { 48 | Self { 49 | backtrace: Vec::new(), 50 | } 51 | } 52 | 53 | /// Resets the backtrace information. 54 | pub fn clear(&mut self) { 55 | self.backtrace.clear(); 56 | } 57 | 58 | /// Adds backtrace hooks to the fuzzed program. 59 | /// 60 | /// There are two hook types: 61 | /// 62 | /// * *backtrace in* hooks signaling that we've entered a new function and pushing the 63 | /// return address on the backtrace; 64 | /// * *backtrace out* hooks signaling that we've left a function and popping the latest 65 | /// address push on the backtrace. 66 | pub fn add_hooks( 67 | ranges: Vec, 68 | vma: &VirtMemAllocator, 69 | hooks: &mut Hooks, 70 | ) -> Result<()> { 71 | // Iterates over the code ranges. 72 | for CoverageRange(range) in ranges.iter() { 73 | // In a given range, iterates over each instruction address. 74 | for addr in range.clone().step_by(4) { 75 | // Reads the instruction at the current address. 76 | let mut code = [0; 4]; 77 | vma.read(addr, &mut code)?; 78 | // Disassemble the instruction and returns a tuple that contains: 79 | // 80 | // * if the instruction enters a function; 81 | // * if the instruction leaves a function. 82 | let (bt_in, bt_out) = CSE.with(|cs| { 83 | let insns = cs 84 | .disasm_count(&code, addr, 1) 85 | .expect("could not disassemble while adding backtrace hooks"); 86 | if let Some(insn) = insns.as_ref().first() { 87 | ( 88 | Self::BT_INSNS.contains(&insn.mnemonic().unwrap()), 89 | insn.mnemonic().unwrap() == "ret", 90 | ) 91 | } else { 92 | (false, false) 93 | } 94 | }); 95 | // Adds the corresponding hook(s) depending on the instruction type. 96 | if bt_in { 97 | hooks.add_backtrace_hook(addr, Self::hook_in); 98 | } else if bt_out { 99 | hooks.add_backtrace_hook(addr, Self::hook_out); 100 | } 101 | } 102 | } 103 | Ok(()) 104 | } 105 | 106 | /// Handles *backtrace in* hooks by adding the current instruction's address to the backtrace 107 | /// vector. 108 | pub fn hook_in(args: &mut HookArgs) -> Result { 109 | args.bdata.backtrace.push(args.addr); 110 | Ok(ExitKind::Continue) 111 | } 112 | 113 | /// Handles *backtrace out* hooks by removing the most recently added instruction address of 114 | /// the backtrace vector. 115 | pub fn hook_out(args: &mut HookArgs) -> Result { 116 | args.bdata.backtrace.pop(); 117 | Ok(ExitKind::Continue) 118 | } 119 | 120 | /// Hashes backtrace PCs to get a unique crash identifier. 121 | pub fn get_crash_hash(bt: &Backtrace) -> u64 { 122 | let mut hash = 0; 123 | for pc in bt.backtrace.iter() { 124 | hash ^= pc << 13; 125 | hash ^= hash >> 7; 126 | hash ^= hash >> 17; 127 | } 128 | hash 129 | } 130 | } 131 | 132 | impl Default for Backtrace { 133 | fn default() -> Self { 134 | Self::new() 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /examples/simple_tracer/src/main.rs: -------------------------------------------------------------------------------- 1 | use hyperpom::applevisor as av; 2 | use hyperpom::config::*; 3 | use hyperpom::core::*; 4 | use hyperpom::corpus::*; 5 | use hyperpom::coverage::*; 6 | use hyperpom::crash::*; 7 | use hyperpom::error::*; 8 | use hyperpom::hooks::*; 9 | use hyperpom::loader::*; 10 | use hyperpom::memory::*; 11 | use hyperpom::tracer::*; 12 | use hyperpom::utils::*; 13 | use hyperpom::*; 14 | 15 | // Empty global data. 16 | #[derive(Clone)] 17 | pub struct GlobalData; 18 | // Empty local data. 19 | #[derive(Clone)] 20 | pub struct LocalData; 21 | 22 | // A simple loader that maps a binary at virtual address `0x100000`. 23 | #[derive(Clone)] 24 | pub struct SimpleLoader { 25 | binary: Vec, 26 | entry_point: u64, 27 | } 28 | 29 | impl SimpleLoader { 30 | // Creates a new SimpleLoader object. 31 | fn new(binary: &[u8]) -> Result { 32 | Ok(Self { 33 | binary: binary.to_vec(), 34 | entry_point: 0x100000, 35 | }) 36 | } 37 | } 38 | 39 | impl Loader for SimpleLoader { 40 | type LD = LocalData; 41 | type GD = GlobalData; 42 | 43 | // Creates the mapping needed for the binary and writes the instructions into it. 44 | fn map(&mut self, executor: &mut Executor) -> Result<()> { 45 | executor.vma.map( 46 | self.entry_point, 47 | round_virt_page!(self.binary.len()) as usize, 48 | av::MemPerms::RX, 49 | )?; 50 | executor.vma.write(self.entry_point, &self.binary)?; 51 | Ok(()) 52 | } 53 | 54 | // Sets PC to the entry point. 55 | fn pre_exec(&mut self, executor: &mut Executor) -> Result { 56 | executor.vcpu.set_reg(av::Reg::PC, self.entry_point)?; 57 | Ok(ExitKind::Continue) 58 | } 59 | 60 | // Unused 61 | fn load_testcase( 62 | &mut self, 63 | _executor: &mut Executor, 64 | _testcase: &[u8], 65 | ) -> Result { 66 | Ok(LoadTestcaseAction::NewAndReset) 67 | } 68 | 69 | // Unused 70 | fn symbols(&self) -> Result { 71 | Ok(Symbols::new()) 72 | } 73 | 74 | // Unused 75 | fn code_ranges(&self) -> Result> { 76 | Ok(vec![]) 77 | } 78 | 79 | // Unused 80 | fn coverage_ranges(&self) -> Result> { 81 | Ok(vec![]) 82 | } 83 | 84 | // Defines the address range that contains our instructions. 85 | fn trace_ranges(&self) -> Result> { 86 | Ok(vec![TraceRange::new( 87 | self.entry_point, 88 | self.entry_point + self.binary.len() as u64, 89 | )]) 90 | } 91 | } 92 | 93 | /// Tracing hooks callback. 94 | /// 95 | /// Disassembles the current instruction using `CSE`, the capstone engine instance in hyperpom and 96 | /// displays it to `stdout`. 97 | pub fn tracer_hook(args: &mut HookArgs) -> Result { 98 | CSE.with(|cs| { 99 | let insns = cs 100 | .disasm_count(args.insn, args.addr, 1) 101 | .expect("could not disassemble while adding coverage hooks"); 102 | let insn = insns.as_ref().first().unwrap(); 103 | println!("{}", insn); 104 | }); 105 | Ok(ExitKind::Continue) 106 | } 107 | 108 | fn main() { 109 | // Creates the virtual machine instance needed to access the hypervisor features. 110 | // This is handled automatically when fuzzing, but needs to be done manually when using an 111 | // Executor. 112 | let _vm = av::VirtualMachine::new(); 113 | // Unused, but necessary global and local data structures. 114 | let gdata = GlobalData; 115 | let ldata = LocalData; 116 | // Test binary 117 | let asm = String::from( 118 | "label0: 119 | mov x0, 0 120 | mov x1, 0 121 | b label3 122 | label1: 123 | mov x1, 1 124 | cmp x0, #0x30 125 | b.ne label2 126 | b label4 127 | label2: 128 | mov x1, 2 129 | b label4 130 | label3: 131 | mov x1, 3 132 | cmp x0, #0x10 133 | mov x0, #0x20 134 | b.eq label2 135 | b label1 136 | label4: 137 | ret", 138 | ); 139 | // Assembled using the `KSE` keystone engine instance provided by Hyperpom. 140 | let binary = KSE.with(|ks| ks.asm(asm, 0).expect("could not assemble")); 141 | // Instanciates the test loader with our assembled instructions. 142 | let loader = SimpleLoader::new(&binary.bytes).expect("could not create loader"); 143 | // Builds a default configuration for the executor with an address space size of, at most, 144 | // 0x10000000 bytes. 145 | let config = ExecConfig::builder(0x10000000) 146 | .tracer(true) 147 | .tracer_hook(tracer_hook) 148 | .build(); 149 | // Instanciates the executor with the values above. 150 | let mut executor = 151 | Executor::<_, _, _>::new(config, loader, ldata, gdata).expect("could not create executor"); 152 | // Initializes the executor's address space and registers. 153 | // This is handled automatically when fuzzing, but needs to be done manually when using an 154 | // Executor. 155 | executor.init().expect("could not init executor"); 156 | // Runs the executor. It will stop automatically when the `ret` instruction is executed. 157 | executor.run(None).expect("execution failed"); 158 | // Makes sure that we obtained the expected result of 2. 159 | assert_eq!(executor.vcpu.get_reg(av::Reg::X1), Ok(2)); 160 | } 161 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/README.md: -------------------------------------------------------------------------------- 1 | # uPNG Fuzzer 2 | 3 | This example targets the [uPNG decoding library](https://github.com/elanthis/upng/). 4 | 5 | This project is a good real-world example to showcase Hyperpom's usage considering it has been abandoned for a while now and is already affected by known vulnerabilities that remain [unfixed](https://github.com/elanthis/upng/pull/5). 6 | 7 | ## Compiling the Target 8 | 9 | This step is optional, since the binary is provided, but if you want to recompile it, you'll first need an AArch64 toolchain to compile the binary to an AArch64 ELF. 10 | 11 | You can use the [Android NDK](https://developer.android.com/ndk/downloads) for this. Download the NDK and unzip it to a location of your choice (`${NDK_PATH}`). 12 | 13 | Then, using the provided `Makefile` you can compile the target program with the following command: 14 | 15 | ``` 16 | NDK_PATH=${NDK_PATH} make build-target 17 | ``` 18 | 19 | ## Running the Program 20 | 21 | To run the program you can simply do: 22 | 23 | ``` 24 | make run 25 | ``` 26 | 27 | If everything went as expected, crashes should appear after a few minutes: 28 | 29 | ``` 30 | Loading corpus... 31 | Corpus loaded! 32 | [...] 33 | [00:04:14] #: 16416354 - Execs/s: 64631 - Paths: 208 - Crashes: 134730 (3 uniques) - Timeouts: 0 34 | ``` 35 | 36 | ```console 37 | $ cat tmp/work/worker_0*/crashes/*.info 38 | 39 | Synchronous Exception from Lower EL using AArch64 40 | ================================================= 41 | 42 | Crash Reason 43 | ------------ 44 | 45 | EXCEPTION => [syndrome: 000000005a000008, virtual addr: 0000000000000000, physical addr: 0000000000000000] 46 | 47 | 48 | Virtual CPU State 49 | ----------------- 50 | 51 | EL0: 52 | X0: 0000000000000000 X1: 0000000000000004 X2: 0000000000205ddc X3: 0000000000000006 53 | X4: 0000000000000000 X5: 0000000000000000 X6: 0000000000000000 X7: 000000000000001d 54 | X8: 0000000000000026 X9: 0000000000205cdc X10: 00000000002053dc X11: ffffffffffffff22 55 | X12: 000000000000000d X13: 0000000000000010 X14: 0000000000000003 X15: 0000000000000000 56 | X16: 0000000000000007 X17: 0000000000000065 X18: 0000000000000000 X19: 0000fffc00000000 57 | X20: 000000000000001f X21: 000000000000013c X22: 0000fffc0000006f X23: 0000fffc00000052 58 | X24: 0000000000000065 X25: 0000000000000001 X26: 000000000000ffff X27: 0000000000000027 59 | X28: 0000000000205ddc X29: 0000ffff000fff40 LR: 000000000000001b PC: ffffffffffff0404 60 | SP: 0000ffff000fedf0 61 | EL1: 62 | SCTLR: 0000000030101185 SP: fffffffffffe1000 63 | CPSR: 00000000204003c5 SPSR: 00000000200003c0 64 | FAR: 0000fffbffffff91 PAR: 0000000000000800 65 | ESR: 0000000092000005 ELR: 000000000021ecd8 66 | 67 | 68 | Backtrace 69 | --------- 70 | 71 | upng upng_decode+0x1a4/0x390 [0x21db88] 72 | upng uz_inflate+0xf38/0x10c8 [0x21ecd8] 73 | 74 | [...] 75 | ``` 76 | 77 | You can check that these crash are valid using a version of the target built with ASAN. 78 | 79 | ```console 80 | $ make check /path/to/crashfile 81 | ``` 82 | 83 | You should obtain an output similar to the following: 84 | 85 | ``` 86 | ================================================================= 87 | ==17672==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x000102e03ce2 at pc 0x000100306ad8 bp 0x00016fb012f0 sp 0x00016fb012e8 88 | READ of size 1 at 0x000102e03ce2 thread T0 89 | #0 0x100306ad4 in inflate_huffman upng.c:546 90 | #1 0x1003054d4 in uz_inflate_data upng.c:631 91 | #2 0x100303e30 in uz_inflate upng.c:670 92 | #3 0x100303280 in upng_decode upng.c:1078 93 | #4 0x1002ffcf8 in main png2tga.c:16 94 | #5 0x10039d088 in start+0x204 (dyld:arm64+0x5088) 95 | #6 0x25727ffffffffffc () 96 | 97 | Address 0x000102e03ce2 is a wild pointer inside of access range of size 0x000000000001. 98 | SUMMARY: AddressSanitizer: heap-buffer-overflow upng.c:546 in inflate_huffman 99 | Shadow bytes around the buggy address: 100 | 0x0070205e0740: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 101 | 0x0070205e0750: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 102 | 0x0070205e0760: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 103 | 0x0070205e0770: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 104 | 0x0070205e0780: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 105 | =>0x0070205e0790: fa fa fa fa fa fa fa fa fa fa fa fa[fa]fa fa fa 106 | 0x0070205e07a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 107 | 0x0070205e07b0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 108 | 0x0070205e07c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 109 | 0x0070205e07d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 110 | 0x0070205e07e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 111 | Shadow byte legend (one shadow byte represents 8 application bytes): 112 | Addressable: 00 113 | Partially addressable: 01 02 03 04 05 06 07 114 | Heap left redzone: fa 115 | Freed heap region: fd 116 | Stack left redzone: f1 117 | Stack mid redzone: f2 118 | Stack right redzone: f3 119 | Stack after return: f5 120 | Stack use after scope: f8 121 | Global redzone: f9 122 | Global init order: f6 123 | Poisoned by user: f7 124 | Container overflow: fc 125 | Array cookie: ac 126 | Intra object redzone: bb 127 | ASan internal: fe 128 | Left alloca redzone: ca 129 | Right alloca redzone: cb 130 | ==17672==ABORTING 131 | ``` 132 | 133 | **Note:** Corpus majoritarily taken from [go-fuzz-corpus](https://github.com/dvyukov/go-fuzz-corpus/tree/master/png) which is under an [Apache License 2.0](https://github.com/dvyukov/go-fuzz-corpus/blob/master/LICENSE). 134 | 135 | ## Tracing a Testcase 136 | 137 | It is also possible to trace the target with the following command: 138 | 139 | ``` 140 | make trace /path/to/testcase 141 | ``` 142 | 143 | The resulting trace file can be found in `tmp/trace.txt`. 144 | 145 | ```console 146 | $ head tmp/trace.txt 147 | 0x21efe4: stp x29, x30, [sp, #-0x20]! 148 | 0x21efe8: stp x20, x19, [sp, #0x10] 149 | 0x21efec: mov x29, sp 150 | 0x21eff0: mov x20, x0 151 | 0x21eff4: mov w0, #0x50 152 | 0x21eff8: mov x19, x1 153 | 0x21effc: bl #0x257338 154 | 0x257338: paciasp 155 | 0x21f000: cbz x0, #0x21f030 156 | 0x21f004: adrp x8, #0x206000 157 | ``` 158 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! Apple Silicon hypervisor-based fuzzer for ARM64 binaries. 2 | //! 3 | //! ## Disclaimer 4 | //! 5 | //! The idea behind this project was to create an efficient and fast fuzzer that would leverage 6 | //! Apple Silicon's features. However, at this stage, while the fuzzer works, it is still mostly a 7 | //! proof of concept and requires tons of enhancement to provide better features, usability and 8 | //! performances. 9 | //! 10 | //! It might be enough for your use cases, but keep in mind that you might encounter limitations 11 | //! that weren't factored in while designing the project. In any case, feel free to 12 | //! [open an issue](https://github.com/impalabs/hyperpom/issues) and we'll try to address your 13 | //! problem. 14 | //! 15 | //! ## Hyperpom Internals & Usage 16 | //! 17 | //! If you want an in-depth guide on how to use this fuzzer, you can directly jump to the 18 | //! chapter about the [`Loader`](loader::Loader), which provides different examples. 19 | //! 20 | //! Otherwise, if you want a better understanding of the fuzzer's implementation and the 21 | //! interactions between its components, it is recommended to read the documentation in the 22 | //! following order. 23 | //! 24 | //! 1. Memory Management 25 | //! 1. [Physical Memory Allocator](memory::PhysMemAllocator) 26 | //! 2. [Slab Allocator](memory::SlabAllocator) 27 | //! 3. [Page Table Manager](memory::PageTableManager) 28 | //! 4. [Virtual Memory Allocator](memory::VirtMemAllocator) 29 | //! 2. [Exception Handling](exceptions::Exceptions) 30 | //! 3. [Cache Maintenance](caches::Caches) 31 | //! 4. [Hooks](hooks::Hooks) 32 | //! 5. [Coverage](coverage::GlobalCoverage) 33 | //! 6. [Tracing](tracer::Tracer) 34 | //! 7. [Corpus](corpus::Corpus) 35 | //! 8. [Mutator](mutator::Mutator) 36 | //! 9. Fuzzer's Core 37 | //! 1. [HyperPom](core::HyperPom) 38 | //! 2. [Worker](core::Worker) 39 | //! 3. [Executor](core::Executor) 40 | //! 10. [Config](config::Config) 41 | //! 11. [Loader](loader::Loader) 42 | //! 43 | //! ## Getting Started 44 | //! 45 | //! ### Prerequisites 46 | //! 47 | //! 1. Install Rust and `rustup` using the 48 | //! [official guide](https://www.rust-lang.org/tools/install). 49 | //! 2. Install the [nightly channel](https://rust-lang.github.io/rustup/concepts/channels.html). 50 | //! 51 | //! ``` 52 | //! rustup toolchain install nightly 53 | //! ``` 54 | //! 55 | //! 3. To use this channel when compiling you can either: 56 | //! 57 | //! - set it as default using `rustup default nightly`; 58 | //! - or add `+nightly` everytime you compile a binary with `cargo`. 59 | //! 60 | //! 4. Install Cmake, using `brew` for example: 61 | //! 62 | //! ```console 63 | //! brew install cmake 64 | //! ``` 65 | //! 66 | //! ### Self-Signed Binaries and Hypervisor Entitlement 67 | //! 68 | //! To be able to reach the Hypervisor Framework, a binary executable has to have been granted the [hypervisor entitlement](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_hypervisor). 69 | //! 70 | //! You can add this entitlement to a binary located at `/path/to/binary` by using the `entitlements.xml` file found at the root of the Hyperpom repository and the following command: 71 | //! 72 | //! ``` 73 | //! codesign --sign - --entitlements entitlements.xml --deep --force /path/to/binary 74 | //! ``` 75 | //! 76 | //! 77 | //! ### Compilation Workflow 78 | //! 79 | //! Create a Rust project and add Hyperpom as a dependency in `Cargo.toml`. You can either pull it 80 | //! from [crates.io](https://crates.io/crates/hyperpom) ... 81 | //! 82 | //! ```toml 83 | //! # Check which version is the latest, this part of the README might not be updated 84 | //! # in future releases. 85 | //! hyperpom = "0.1.0" 86 | //! ``` 87 | //! 88 | //! ... or directly from the [GitHub repository](https://github.com/impalabs/hyperpom). 89 | //! 90 | //! ```toml 91 | //! hyperpom = { git="https://github.com/impalabs/hyperpom", branch="master" } 92 | //! ``` 93 | //! 94 | //! Create a file called `entitlements.txt` in the project's root directory and add the following: 95 | //! 96 | //! ```xml 97 | //! 98 | //! 99 | //! 100 | //! 101 | //! com.apple.security.hypervisor 102 | //! 103 | //! 104 | //! 105 | //! ``` 106 | //! 107 | //! Write code and then build the project. 108 | //! 109 | //! ``` 110 | //! cargo build --release 111 | //! ``` 112 | //! 113 | //! Sign the binary and grant the hypervisor entitlement. 114 | //! 115 | //! ``` 116 | //! codesign --sign - --entitlements entitlements.xml --deep --force target/release/${PROJECT_NAME} 117 | //! ``` 118 | //! 119 | //! Run the binary. 120 | //! 121 | //! ``` 122 | //! target/release/${PROJECT_NAME} 123 | //! ``` 124 | //! 125 | //! ## Examples 126 | //! 127 | //! Four examples are provided to give you a better understanding of how the framework operates and 128 | //! get you started: 129 | //! 130 | //! * [simple_executor](https://github.com/impalabs/hyperpom/tree/master/examples/simple_executor): 131 | //! showcases how to run arbitrary code in a VM using an `Executor`. 132 | //! * [simple_tracer](https://github.com/impalabs/hyperpom/tree/master/examples/simple_tracer): 133 | //! runs a program while tracing its instructions. 134 | //! * [simple_fuzzer](https://github.com/impalabs/hyperpom/tree/master/examples/simple_fuzzer): 135 | //! fuzzes a simple program. 136 | //! * [upng_fuzzer](https://github.com/impalabs/hyperpom/tree/master/examples/upng_fuzzer): fuzzer 137 | //! for the [uPNG](https://github.com/elanthis/upng/) library. 138 | //! 139 | //! You can also have a look at the 140 | //! [tests](https://github.com/impalabs/hyperpom/tree/master/tests/tests.rs). 141 | 142 | #![feature(exclusive_range_pattern)] 143 | #![feature(iterator_try_collect)] 144 | #![feature(map_try_insert)] 145 | #![feature(portable_simd)] 146 | #![feature(slice_partition_dedup)] 147 | 148 | pub mod backtrace; 149 | pub mod caches; 150 | pub mod config; 151 | pub mod core; 152 | pub mod corpus; 153 | pub mod coverage; 154 | pub mod crash; 155 | pub mod error; 156 | pub mod exceptions; 157 | pub mod hooks; 158 | pub mod loader; 159 | pub mod memory; 160 | pub mod mutator; 161 | pub mod tracer; 162 | pub mod utils; 163 | 164 | pub extern crate applevisor; 165 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | hyperpom logo 3 |

4 |

5 | HYPERPOM 6 |
7 | AArch64 fuzzing library based on the Apple Silicon hypervisor 8 |

9 | 10 |
11 | 12 |

13 | shields.io license 14 | shields.io version 15 | shields.io platform 16 |
17 | shields.io rust version 18 | shields.io crates.io 19 | shields.io crates.io 20 |

21 | 22 |
23 | 24 | ## Table of contents 25 | 26 | * [Disclaimer](#warning-disclaimer) 27 | * [Getting Started](#getting-started) 28 | * [Prerequisites](#prerequisites) 29 | * [Self-Signed Binaries and Hypervisor Entitlement](#self-signed-binaries-and-hypervisor-entitlement) 30 | * [Compilation Workflow](#compilation-workflow) 31 | * [Documentation](#documentation) 32 | * [Examples](#examples) 33 | * [Running the Tests](#running-the-tests) 34 | * [Authors](#authors) 35 | 36 | 37 | Hyperpom is a coverage-guided mutation-based fuzzing framework built on top of the [Apple Silicon Hypervisor](https://developer.apple.com/documentation/hypervisor/apple_silicon). It has been designed to easily instrument and fuzz AArch64 userland binaries. 38 | 39 | ## :warning: Disclaimer 40 | 41 | The idea behind this project was to create an efficient and fast fuzzer that would leverage Apple Silicon's features. However, at this stage, while the fuzzer works, it is still mostly a proof of concept and requires tons of enhancement to provide better features, usability and performances. 42 | 43 | It might be enough for your use cases, but keep in mind that you might encounter limitations that weren't factored in while designing the project. In any case, feel free to open an issue and we'll try to address your problem. 44 | 45 | ## Getting Started 46 | 47 | ### Prerequisites 48 | 49 | 1. Install Rust and `rustup` using the [official guide](https://www.rust-lang.org/tools/install). 50 | 2. Install the [nightly channel](https://rust-lang.github.io/rustup/concepts/channels.html). 51 | 52 | ``` 53 | rustup toolchain install nightly 54 | ``` 55 | 56 | 3. To use this channel when compiling you can either: 57 | 58 | - set it as default using `rustup default nightly`; 59 | - or add `+nightly` everytime you compile a binary with `cargo`. 60 | 61 | 4. Install Cmake, using `brew` for example: 62 | 63 | ```console 64 | brew install cmake 65 | ``` 66 | 67 | ### Self-Signed Binaries and Hypervisor Entitlement 68 | 69 | To be able to reach the Hypervisor Framework, a binary executable has to have been granted the [hypervisor entitlement](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_hypervisor). 70 | 71 | You can add this entitlement to a binary located at `/path/to/binary` by using the `entitlements.xml` file found at the root of the Hyperpom repository and the following command: 72 | 73 | ``` 74 | codesign --sign - --entitlements entitlements.xml --deep --force /path/to/binary 75 | ``` 76 | 77 | ### Compilation Workflow 78 | 79 | Create a Rust project and add Hyperpom as a dependency in `Cargo.toml`. You can either pull it from [crates.io](https://crates.io/crates/hyperpom) ... 80 | 81 | ```toml 82 | # Check which version is the latest, this part of the README might not be updated 83 | # in future releases. 84 | hyperpom = "0.1.0" 85 | ``` 86 | 87 | ... or directly from the [GitHub repository](https://github.com/impalabs/hyperpom). 88 | 89 | ```toml 90 | hyperpom = { git="https://github.com/impalabs/hyperpom", branch="master" } 91 | ``` 92 | 93 | Create a file called `entitlements.txt` in the project's root directory and add the following: 94 | 95 | ```xml 96 | 97 | 98 | 99 | 100 | com.apple.security.hypervisor 101 | 102 | 103 | 104 | ``` 105 | 106 | Write code and then build the project. 107 | 108 | ``` 109 | cargo build --release 110 | ``` 111 | 112 | Sign the binary and grant the hypervisor entitlement. 113 | 114 | ``` 115 | codesign --sign - --entitlements entitlements.xml --deep --force target/release/${PROJECT_NAME} 116 | ``` 117 | 118 | Run the binary. 119 | 120 | ``` 121 | target/release/${PROJECT_NAME} 122 | ``` 123 | 124 | ## Documentation 125 | 126 | The documentation is available online at the following address: [https://docs.rs/hyperpom](https://docs.rs/hyperpom) 127 | 128 | Alternatively, you can generate it using `cargo`: 129 | 130 | ``` 131 | cargo doc --open 132 | ``` 133 | 134 | The documentation contains information on using the framework and its internals. For an in-depth guide, have a look at the `Loader` chapter, which provides examples on how to use the fuzzer and harness your targets. 135 | 136 | ## Examples 137 | 138 | Four examples are provided to give you a better understanding of how the framework operates and get you started: 139 | 140 | * [simple_executor](examples/simple_executor): showcases how to run arbitrary code in a VM using an `Executor`. 141 | * [simple_tracer](examples/simple_tracer): runs a program while tracing its instructions. 142 | * [simple_fuzzer](examples/simple_fuzzer): fuzzes a simple program. 143 | * [upng_fuzzer](examples/upng_fuzzer): fuzzer for the [uPNG](https://github.com/elanthis/upng/) library. 144 | 145 | You can also have a look at the [tests](tests/tests.rs). 146 | 147 | ## Running the Tests 148 | 149 | To run tests using the `Makefile` provided with the project, you'll first need to install [`jq`](https://stedolan.github.io/jq/download/). You can do so using `brew`: 150 | 151 | ``` 152 | brew install jq 153 | ``` 154 | 155 | You can then run the tests with the provided `Makefile` using the following command: 156 | 157 | ``` 158 | make tests 159 | ``` 160 | 161 | ## Authors 162 | 163 | * [**Maxime Peterlin**](https://twitter.com/lyte__) - hyperpom@impalabs.com 164 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/bin/src/README: -------------------------------------------------------------------------------- 1 | uPNG -- derived from LodePNG version 20100808 2 | ========================================== 3 | 4 | Copying 5 | ------- 6 | 7 | Copyright (c) 2005-2010 Lode Vandevenne 8 | Copyright (c) 2010 Sean Middleditch 9 | 10 | This software is provided 'as-is', without any express or implied 11 | warranty. In no event will the authors be held liable for any damages 12 | arising from the use of this software. 13 | 14 | Permission is granted to anyone to use this software for any purpose, 15 | including commercial applications, and to alter it and redistribute it 16 | freely, subject to the following restrictions: 17 | 18 | 1. The origin of this software must not be misrepresented; you must not 19 | claim that you wrote the original software. If you use this software 20 | in a product, an acknowledgment in the product documentation would be 21 | appreciated but is not required. 22 | 23 | 2. Altered source versions must be plainly marked as such, and must not be 24 | misrepresented as being the original software. 25 | 26 | 3. This notice may not be removed or altered from any source 27 | distribution. 28 | 29 | Features 30 | -------- 31 | 32 | uPNG supports loading and decoding PNG images into a simple byte buffer, suitable 33 | for passing directly to OpenGL as texture data. 34 | 35 | uPNG does NOT support interlaced images, paletted images, and fixed-transparency. 36 | Checksums are NOT verified and corrupt image data may be undetected. 37 | 38 | It DOES support RGB, RGBA, greyscale, and greyscale-with-alpha images. RGB and 39 | RGBA are currently only supported in 8-bit color depths, and greyscale images 40 | are supported in either 1-, 2-, 4-, or 8-bit color depths. 41 | 42 | WARNING: the source project that uPNG is derived from, LodePNG, did not have 43 | the cleanest or best documented code. Several potential buffer overflows in the 44 | original source have been fixed in uPNG, but there may be more. Do NOT use uPNG 45 | to load data from untrusted sources, e.g. the Web. Doing so may open a 46 | remotely exploitable buffer overflow attack in your application. 47 | 48 | Installation 49 | ------------ 50 | 51 | Copy the upng.c and upng.h files into your project, and add them to your build 52 | system. upng.c will compile as C++ if necessary. 53 | 54 | Usage 55 | ----- 56 | 57 | To load a PNG, you must create an upng_t instance, load the raw PNG into the 58 | decoder, and then you can query the upng_t for image properties and the 59 | decoded image buffer. 60 | 61 | upng_t* upng; 62 | 63 | upng = upng_new_from_file("image.png"); 64 | if (upng != NULL) { 65 | upng_decode(upng); 66 | if (upng_get_error(upng) == UPNG_EOK) { 67 | /* do stuff with image */ 68 | } 69 | 70 | upng_free(upng); 71 | } 72 | 73 | You can load a PNG either from an in-memory buffer of bytes or from a file 74 | specified by file path. 75 | 76 | upng_new_from_bytes(const unsigned char*, unsigned long length) 77 | upng_new_from_file(const char*) 78 | 79 | Once an upng_t object is created, you can read just its header properties, 80 | decode the entire file, and release its resources. 81 | 82 | upng_header(upng_t*) Reads just the header, sets image properties 83 | upng_decode(upng_t*) Decodes image data 84 | upng_free(upng_t*) Frees the resources attached to a upng_t object 85 | 86 | The query functions are: 87 | 88 | upng_get_width(upng_t*) Returns width of image in pixels 89 | upng_get_height(upng_t*) Returns height of image in pixels 90 | upng_get_size(upng_t*) Returns the total size of the image buffer in bytes 91 | upng_get_bpp(upng_t*) Returns the number of bits per pixel (e.g., 32 for 8-bit RGBA) 92 | upng_get_bitdepth(upng_t*) Returns the number of bits per component (e.g., 8 for 8-bit RGBA) 93 | upng_get_pixelsize(upng_t*) Returns the number of bytes per pixel (e.g., 4 for 8-bit RGBA) 94 | upng_get_components(upng_t*) Returns the number of components per pixel (e.g., 4 for 8-bit RGBA) 95 | upng_get_format(upng_t*) Returns the format of the image buffer (see below) 96 | upng_get_buffer(upng_t*) Returns a pointer to the image buffer 97 | 98 | Additionally, for error handling, you can use: 99 | 100 | upng_get_error(upng_t*) Returns the error state of the upng object (UPNG_EOK means no error) 101 | upng_get_error_line(upng_t*) Returns the line in the upng.c file where the error state was set 102 | 103 | The formats supported are: 104 | 105 | UPNG_RGB8 24-bit RGB 106 | UPNG_RGB16 48-bit RGB 107 | UPNG_RGBA8 32-bit RGBA 108 | UPNG_RGBA16 64-bit RGBA 109 | UPNG_LUMINANCE8 8-bit Greyscale 110 | UPNG_LUMINANCEA8 8-bit Greyscale w/ 8-bit Alpha 111 | 112 | Possible error states are: 113 | 114 | UPNG_EOK No error (success) 115 | UPNG_ENOMEM Out of memory 116 | UPNG_ENOTFOUND Resource not found 117 | UPNG_ENOTPNG Invalid file header (not a PNG image) 118 | UPNG_EMALFORMED PNG image data does not follow spec and is malformed 119 | UPNG_EUNSUPPORTED PNG image data is well-formed but not supported by uPNG 120 | 121 | TODO 122 | ---- 123 | 124 | - Audit the code (particularly the Huffman decoder) for buffer overflows. Make sure 125 | uPNG is safe to use even with image data from untrusted sources. 126 | 127 | - Make the decompressor work in a streaming/buffered manner, so that we don't need 128 | to stitch together the PNG IDATA chunks before decompressing, shaving off one 129 | unnecessary allocation. 130 | 131 | - Update the unfiltering code to work on the decompressed image buffer, rather than 132 | needing a separate output buffer. The removal of the Adam7 de-interlacing support 133 | makes this easier. Removes another unnecessary allocation. 134 | 135 | - Update the decoder API to work in a stream/buffered manner, so files can be read 136 | without needing to allocate a temporary buffer. This removes yet another 137 | unnecessary allocation. 138 | 139 | - Update the decoder API to allow the user to provide an output buffer, so that 140 | PNG images can be decoded directly to mapped texture memory. Removes the need 141 | for the last unnecessary allocation. 142 | 143 | - Test that greyscale images with less than 8-bits of depth actually work, fix 144 | or remove if they do not. 145 | 146 | - Provide optional format conversion (as an extension to byte swizzling) to 147 | convert input PNGs in one format to one of a (limited) set of target output 148 | formats commonly used for texturing. 149 | 150 | - Provide floating-point conversion, at least for 16-bit source images, for 151 | HDR textures. 152 | 153 | - Provide vertical flipping of decoded image data for APIs that prefer textures 154 | with an origin in the lower-left instead of upper-left. 155 | -------------------------------------------------------------------------------- /examples/upng_fuzzer/src/upngzz.rs: -------------------------------------------------------------------------------- 1 | use std::io::Write; 2 | use std::path::PathBuf; 3 | use std::time::Duration; 4 | 5 | use clap::{Args, Parser, Subcommand}; 6 | use eyre::Result; 7 | use hyperpom as hp; 8 | use hyperpom::applevisor as av; 9 | use hyperpom::config::*; 10 | use hyperpom::core::*; 11 | use hyperpom::corpus::*; 12 | use hyperpom::crash::*; 13 | use hyperpom::hooks::*; 14 | 15 | use crate::loader::*; 16 | 17 | /// The configuration object created from the CLI arguments passed to upngzz. 18 | #[derive(Parser, Debug)] 19 | #[clap( 20 | author = "lyte ", 21 | version = "1.0", 22 | about = "upng fuzzer", 23 | long_about = None)] 24 | pub struct Config { 25 | /// Subcommands. 26 | #[clap(subcommand)] 27 | command: Commands, 28 | } 29 | 30 | /// Fuzzer's CLI subcommands. 31 | #[derive(Debug, Subcommand)] 32 | enum Commands { 33 | /// Fuzzing subcommand. 34 | #[clap(arg_required_else_help = true)] 35 | Fuzz(FuzzSubCommand), 36 | 37 | /// Tracing subcommand. 38 | #[clap(arg_required_else_help = true)] 39 | Trace(TraceSubCommand), 40 | } 41 | 42 | #[derive(Debug, Args)] 43 | pub struct FuzzSubCommand { 44 | /// Path to the binary to fuzz. 45 | #[clap(short = 'b', long = "binary", value_name = "BINARY", required = true, 46 | value_hint = clap::ValueHint::FilePath)] 47 | binary: PathBuf, 48 | 49 | /// Path to the directory containing the shared libraries. 50 | #[clap(short = 'l', long = "libs", value_name = "LIBS", 51 | value_hint = clap::ValueHint::DirPath)] 52 | libs: Option, 53 | 54 | /// Path to the corpus. 55 | #[clap(short = 'c', long = "corpus", value_name = "CORPUS", required = true, 56 | value_hint = clap::ValueHint::DirPath)] 57 | corpus_dir: PathBuf, 58 | 59 | /// Path to the work directory. 60 | #[clap(short = 'd', long = "workdir", value_name = "WORKDIR", required = true, 61 | value_hint = clap::ValueHint::DirPath)] 62 | work_dir: PathBuf, 63 | 64 | /// Number of workers to spawn. 65 | #[clap( 66 | short = 'w', 67 | long = "workers", 68 | value_name = "WORKERS", 69 | default_value = "1" 70 | )] 71 | nb_workers: u32, 72 | 73 | /// Number of testcases executed by the worker before stopping. 74 | #[clap(short = 'i', long = "iterations", value_name = "ITERATIONS")] 75 | nb_iterations: Option, 76 | 77 | /// Physical address space size available to the fuzzer. 78 | #[clap( 79 | short = 's', 80 | long = "size", 81 | value_name = "SIZE", 82 | required = true, 83 | value_parser=clap_num::maybe_hex::, 84 | )] 85 | as_size: usize, 86 | } 87 | 88 | #[derive(Debug, Args)] 89 | pub struct TraceSubCommand { 90 | /// Path to the binary to fuzz. 91 | #[clap(short = 'b', long = "binary", value_name = "BINARY", required = true, 92 | value_hint = clap::ValueHint::FilePath)] 93 | binary: PathBuf, 94 | 95 | /// Path to the directory containing the shared libraries. 96 | #[clap(short = 'l', long = "libs", value_name = "LIBS", 97 | value_hint = clap::ValueHint::DirPath)] 98 | libs: Option, 99 | 100 | /// Path to the testcase to trace. 101 | #[clap(short = 't', long = "testcase", value_name = "TESTCASE", required = true, 102 | value_hint = clap::ValueHint::FilePath)] 103 | testcase: PathBuf, 104 | 105 | /// Path to the trace output file. 106 | #[clap(short = 'o', long = "trace", value_name = "TRACE", required = true, 107 | value_hint = clap::ValueHint::FilePath)] 108 | trace: PathBuf, 109 | 110 | /// Physical address space size available to the fuzzer. 111 | #[clap( 112 | short = 's', 113 | long = "size", 114 | value_name = "SIZE", 115 | required = true, 116 | value_parser=clap_num::maybe_hex::, 117 | )] 118 | as_size: usize, 119 | } 120 | 121 | pub fn from_hex(hex: &str) -> usize { 122 | let hex_stripped = hex.trim_start_matches("0x"); 123 | usize::from_str_radix(hex_stripped, 16).expect("could not parse hex number") 124 | } 125 | 126 | pub fn entry(config: Config) -> Result<()> { 127 | match config.command { 128 | Commands::Fuzz(sub) => fuzz(sub), 129 | Commands::Trace(sub) => trace(sub), 130 | } 131 | } 132 | 133 | pub fn fuzz(config: FuzzSubCommand) -> Result<()> { 134 | // Instanciates global and local data. 135 | let gdata = GlobalData::new(None::<&std::path::Path>); 136 | let ldata = LocalData::new(); 137 | // Creates a loader for the target binary. 138 | let loader = PngLoader::new(config.binary)?; 139 | // Creates a config for the fuzzer. 140 | let config = FuzzConfig::::builder( 141 | config.as_size, 142 | config.work_dir, 143 | config.corpus_dir, 144 | ) 145 | .nb_workers(config.nb_workers) 146 | .seed(0xdeadbeefdeadbeef) 147 | .max_nb_mutations(0x800) 148 | .max_testcase_size(PngLoader::TESTCASE_MAX_SIZE) 149 | .timeout(Duration::new(60, 0)) 150 | .iterations(config.nb_iterations) 151 | .build(); 152 | // Creates an instance of the fuzzer. 153 | let mut hp = 154 | HyperPom::<_, _, _>::new(config, loader, ldata, gdata).expect("could not create fuzzer"); 155 | // Start fuzzing! 156 | hp.fuzz()?; 157 | Ok(()) 158 | } 159 | 160 | pub fn trace(config: TraceSubCommand) -> Result<()> { 161 | let _vm = av::VirtualMachine::new(); 162 | // Instanciates global and local data. 163 | let gdata = GlobalData::new(Some(&config.trace)); 164 | let ldata = LocalData::new(); 165 | // Reads the testcase from disk. 166 | let testcase = Testcase::from_file(config.testcase)?; 167 | // Creates a loader for the target binary. 168 | let loader = PngLoader::new(config.binary)?; 169 | // Creates a config for the fuzzer. 170 | let config = ExecConfig::::builder(config.as_size) 171 | .nb_workers(1) 172 | .timeout(Duration::new(60, 0)) 173 | .iterations(Some(1)) 174 | .tracer(true) 175 | .tracer_hook(tracer_hook) 176 | .build(); 177 | // Creates an instance of the fuzzer. 178 | let mut executor = 179 | Executor::::new(config, loader, ldata, gdata) 180 | .expect("could not create the executor"); 181 | // Start tracing! 182 | executor.init()?; 183 | executor.run(Some(&testcase)).expect("execution failed"); 184 | println!("{}", executor.vcpu); 185 | println!("Testcase covered {:?} paths", executor.cdata.set.len()); 186 | Ok(()) 187 | } 188 | 189 | /// Handles tracing hooks and displays the current instruction to `stdout`. 190 | pub fn tracer_hook(args: &mut HookArgs) -> hp::error::Result { 191 | let gd = args.gdata.write().unwrap(); 192 | let mut trace = std::fs::OpenOptions::new() 193 | .create(true) 194 | .write(true) 195 | .append(true) 196 | .open(gd.path.as_ref().unwrap()) 197 | .unwrap(); 198 | CSE.with(|cs| { 199 | let insns = cs 200 | .disasm_count(args.insn, args.addr, 1) 201 | .expect("could not disassemble while adding coverage hooks"); 202 | let insn = insns.as_ref().first().unwrap(); 203 | writeln!(trace, "{}", insn).expect("could append instructions to the trace"); 204 | }); 205 | Ok(ExitKind::Continue) 206 | } 207 | -------------------------------------------------------------------------------- /src/utils.rs: -------------------------------------------------------------------------------- 1 | //! Miscellaneous functions used by different modules of the fuzzer. 2 | 3 | use std::arch::asm; 4 | 5 | // ----------------------------------------------------------------------------------------------- 6 | // Code ranges 7 | 8 | /// A range of virtual addresses that contains instructions. 9 | #[derive(Clone, Eq, PartialEq, Hash, Debug)] 10 | pub struct CodeRange(pub(crate) std::ops::Range); 11 | 12 | impl CodeRange { 13 | /// Creates a new code range. 14 | /// 15 | /// Since we can't just instrument everything, because of data sections found in code ranges 16 | /// that could be interpreted as instructions. The user is responsible for identifying which 17 | /// ranges are actual code ranges. 18 | pub fn new(start: u64, end: u64) -> Self { 19 | Self(start..end) 20 | } 21 | } 22 | 23 | // ----------------------------------------------------------------------------------------------- 24 | // Random generator 25 | 26 | /// Random number generator based on the xorshift algorithm. 27 | #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] 28 | pub struct Random { 29 | /// The seed used for random generation. 30 | seed: u64, 31 | } 32 | 33 | impl Random { 34 | /// Set of alphanumeric characters that can be used when generating random strings. 35 | const ALPHANUM: &'static str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 36 | 37 | /// Creates a new random number generator. 38 | #[inline] 39 | pub fn new(seed: u64) -> Self { 40 | assert_ne!(seed, 0); 41 | Self { seed } 42 | } 43 | 44 | /// Splits the current random number generator into a second one in a deterministic manner. 45 | #[inline] 46 | pub fn split(&mut self) -> Self { 47 | Self::new(self.u64() ^ 0x43e47ca448538d19) 48 | } 49 | 50 | /// Updates the PRNG's internal seed. 51 | #[inline] 52 | fn update(&mut self) { 53 | self.seed ^= self.seed << 13; 54 | self.seed ^= self.seed >> 7; 55 | self.seed ^= self.seed << 17; 56 | } 57 | 58 | /// Retrieves the PRNG's state without updating it. 59 | #[inline] 60 | pub fn get_state(&self) -> u64 { 61 | self.seed 62 | } 63 | 64 | /// Generates a random `u64` using a uniform distribution. 65 | #[inline] 66 | pub fn u64(&mut self) -> u64 { 67 | self.update(); 68 | self.seed 69 | } 70 | 71 | /// Generates a random `u64` in the range `[start; end[` using a uniform distribution. 72 | #[inline] 73 | pub fn u64_range(&mut self, start: u64, end: u64) -> Option { 74 | self.update(); 75 | Some(start + self.seed % end.checked_sub(start)?) 76 | } 77 | 78 | /// Generates a random `u64` in the range `[start; end[` using an exponential distribution. 79 | // TODO: check start and end, make sure they are valid. 80 | #[inline] 81 | pub fn exp_range(&mut self, start: u64, end: u64) -> Option { 82 | self.update(); 83 | let (start, end) = (start as f64, end as f64); 84 | let rand = start + (end - start) * self.seed as f64 / u64::MAX as f64; 85 | let (exp_start, exp_end, exp_rand) = ( 86 | (-start / 10.0).exp(), 87 | (-end / 10.0).exp(), 88 | (-rand / 10.0).exp(), 89 | ); 90 | let res = start + (end - start) * (exp_rand - exp_end) / (exp_start - exp_end); 91 | Some(res as u64) 92 | } 93 | 94 | /// Generates a random alphanumeric string of length `len`. 95 | pub fn str(&mut self, len: usize) -> String { 96 | (0..len).step_by(8).fold(String::new(), |s, i| { 97 | let size = std::cmp::min(8, len - i); 98 | let random = self.u64(); 99 | (0..size).fold(s, |mut t, j| { 100 | let idx = ((random >> j) & 0xff) % Self::ALPHANUM.len() as u64; 101 | let c = Self::ALPHANUM.as_bytes()[idx as usize] as char; 102 | t.push(c); 103 | t 104 | }) 105 | }) 106 | } 107 | 108 | /// Generates a random vector of bytes of length `len`. 109 | #[allow(clippy::uninit_vec)] 110 | #[inline] 111 | pub fn bytes(&mut self, len: usize) -> Vec { 112 | // let len = if len % 8 != 0 { len + (8 - len % 8) } else { len }; 113 | let mut v = Vec::with_capacity(len); 114 | // SAFETY: we can directly set the length, since the allocation is large enough and 115 | // we fill the vector entirely, so no unitialized values will leak. 116 | unsafe { v.set_len(len) }; 117 | (0..len).step_by(8).fold(v, |mut v, i| { 118 | let size = std::cmp::min(8, len - i); 119 | let random = self.u64(); 120 | v[i..i + size].copy_from_slice(&random.to_le_bytes()[..size]); 121 | v 122 | }) 123 | } 124 | 125 | /// Generates a random vector of bytes of length `len`. 126 | #[inline] 127 | pub fn bytes_into_slice(&mut self, slice: &mut [u8], offset: usize, len: usize) { 128 | for i in (offset..offset + len).step_by(8) { 129 | let size = std::cmp::min(8, offset + len - i); 130 | slice[i..i + size].copy_from_slice(&self.u64().to_le_bytes()[..size]); 131 | } 132 | } 133 | 134 | /// Crates an iterator yielding random bytes. 135 | #[inline] 136 | pub fn bytes_iter(&mut self) -> RandomBytesIterator { 137 | RandomBytesIterator { 138 | rand: self.split(), 139 | current: [0u8; 8], 140 | offset: 0, 141 | } 142 | } 143 | } 144 | 145 | /// Iterator yielding random bytes. 146 | #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] 147 | pub struct RandomBytesIterator { 148 | /// The iterator's PRNG. 149 | rand: Random, 150 | /// Array from which random bytes are yielded. It contains 8 random bytes and is refilled 151 | /// once all values have been used. 152 | current: [u8; 8], 153 | /// The current offset in the random bytes array. 154 | offset: usize, 155 | } 156 | 157 | impl Iterator for RandomBytesIterator { 158 | type Item = u8; 159 | 160 | #[inline] 161 | fn next(&mut self) -> Option { 162 | if self.offset % 8 == 0 { 163 | self.offset = 0; 164 | self.current = self.rand.u64().to_le_bytes(); 165 | } 166 | let b = self.current[self.offset % 8]; 167 | self.offset += 1; 168 | Some(b) 169 | } 170 | } 171 | 172 | // ----------------------------------------------------------------------------------------------- 173 | // Misc functions 174 | 175 | /// A fast log2 implementation for `usize` equivalent to `(x as f64).log2().ceil()`. 176 | #[inline] 177 | pub fn log2(x: usize) -> usize { 178 | let (orig_x, mut x, mut log) = (x, x, 0); 179 | while x != 0 { 180 | x >>= 1; 181 | log += 1; 182 | } 183 | log - 1 + ((orig_x & (orig_x - 1)) != 0) as usize 184 | } 185 | 186 | /// A fast log2 implementation for `usize` equivalent to `(x as f64).log2().floor()`. 187 | #[inline] 188 | pub fn log2_floor(x: usize) -> usize { 189 | let mut x = x; 190 | let mut log = 0; 191 | while x != 0 { 192 | x >>= 1; 193 | log += 1; 194 | } 195 | log - 1_usize 196 | } 197 | 198 | /// Returns the value of the Counter-timer Physical Count register (CNTPCT_EL0). 199 | #[inline] 200 | pub fn get_phys_counter() -> u64 { 201 | let mut count; 202 | unsafe { 203 | asm!( 204 | "mrs {}, cntpct_el0", 205 | out(reg) count 206 | ); 207 | } 208 | count 209 | } 210 | 211 | #[cfg(test)] 212 | mod tests { 213 | use super::*; 214 | use std::collections::HashSet; 215 | 216 | #[test] 217 | fn utils_random_u64() { 218 | let mut rand = Random::new(0xa5a5a5a5a5a5a5); 219 | assert_eq!( 220 | (0..1000) 221 | .map(|_| rand.u64()) 222 | .collect::>() 223 | .len(), 224 | 1000 225 | ); 226 | } 227 | 228 | #[test] 229 | fn utils_random_range() { 230 | let mut rand = Random::new(0xa5a5a5a5a5a5a5); 231 | assert_eq!( 232 | (0..1000).all(|_| { 233 | let r = rand.u64_range(123, 456).unwrap(); 234 | 123 <= r && r < 456 235 | }), 236 | true 237 | ); 238 | } 239 | 240 | #[test] 241 | fn utils_random_exp_range() { 242 | let mut rand = Random::new(0xa5a5a5a5a5a5a5); 243 | let mut distribution = [0; 100]; 244 | (0..10000000).for_each(|_| { 245 | let r = rand.exp_range(0, distribution.len() as u64).unwrap(); 246 | distribution[r as usize] += 1; 247 | }); 248 | println!("{:?}", distribution); 249 | } 250 | 251 | #[test] 252 | fn utils_random_strings() { 253 | let mut rand = Random::new(0xa5a5a5a5a5a5a5); 254 | assert_eq!( 255 | (0..1000) 256 | .map(|_| rand.str(100)) 257 | .collect::>() 258 | .len(), 259 | 1000 260 | ); 261 | } 262 | 263 | #[test] 264 | fn utils_random_bytes_iter() { 265 | let mut rand = Random::new(0xa5a5a5a5a5a5a5); 266 | println!("{:?}", rand.bytes_iter().take(25).collect::>()); 267 | println!("{:?}", rand.bytes_iter().take(25).collect::>()); 268 | println!("{:?}", rand.bytes_iter().take(25).collect::>()); 269 | println!("{:?}", rand.bytes_iter().take(25).collect::>()); 270 | println!("{:?}", rand.bytes_iter().take(25).collect::>()); 271 | assert_eq!( 272 | (0..1000) 273 | .map(|_| rand.bytes_iter().take(10).collect::>()) 274 | .collect::>>() 275 | .len(), 276 | 1000 277 | ); 278 | } 279 | } 280 | -------------------------------------------------------------------------------- /src/caches.rs: -------------------------------------------------------------------------------- 1 | //! Handles everything related to ARMv8 cache and TLB maintenance. 2 | 3 | use applevisor as av; 4 | 5 | use crate::core::*; 6 | use crate::error::*; 7 | use crate::memory::*; 8 | 9 | /// Size of a cache maintenance handler. 10 | pub const HANDLER_SIZE: usize = 0x80; 11 | /// Total size available to map the handlers. 12 | pub const HANDLERS_MEM_SIZE: usize = 0x1000; 13 | /// Maximum number of handlers. 14 | pub const HANDLERS_COUNT: usize = HANDLERS_MEM_SIZE / HANDLER_SIZE; 15 | /// Cache maintenant handler location in memory. 16 | pub const HANDLERS_ADDR: u64 = 0xffff_ffff_fffe_0000; 17 | /// Handlers stack size. 18 | pub const STACK_SIZE: usize = 0x1000; 19 | /// Handlers stack address. 20 | pub const STACK_ADDR: u64 = 0xffff_ffff_fffe_1000; 21 | 22 | /// Cache maintenance functions. 23 | /// 24 | /// # Role of Cache Maintenance in the Fuzzer 25 | /// 26 | /// The fuzzer does a lot of modifications on the virtual address space of fuzzed programs at 27 | /// runtime (e.g. adding breakpoints for hooks) and for these changes to be taken into account, 28 | /// we need to flush caches. 29 | /// 30 | /// # Fuzzer Cache Maintenance 31 | /// 32 | /// The hypervisor doesn't allow cache maintenance outside of the [`applevisor::Vcpu`], which 33 | /// forces us to create handlers for this purpose in the Vcpu's address space. 34 | /// 35 | /// These handlers are found at address [`HANDLERS_ADDR`]. 36 | /// 37 | /// ```text 38 | /// +---------------+ <--- HANDLERS_ADDR + 0x000 39 | /// | | 40 | /// | IC IVAU | 41 | /// | handler | 42 | /// | | 43 | /// +---------------+ <--- HANDLERS_ADDR + 0x080 44 | /// | | 45 | /// | TLBI VAAE1 | 46 | /// | handler | 47 | /// | | 48 | /// +---------------+ <--- HANDLERS_ADDR + 0x100 49 | /// | | 50 | /// • • 51 | /// • • 52 | /// • • 53 | /// ``` 54 | /// 55 | /// In order to keep the number of context-switches between the fuzzer and the hypervisor to a 56 | /// minimum, the handlers are written in such a way that they jump back to where we originally 57 | /// stopped the exectution. 58 | /// 59 | /// ```text 60 | /// 61 | /// +-----------------+ 62 | /// | NORMAL | 63 | /// | EXECUTION |<-----------------+ 64 | /// +--------+--------+ | 65 | /// EL0 | | 66 | /// -------------------|---------------------------|----------------------- 67 | /// EL1 | | 68 | /// v | 69 | /// +--------+--------+ +--------+--------+ 70 | /// | EXCEPTION FROM | | CACHE | 71 | /// | THE GUEST | | MAINTENANCE | 72 | /// +--------+--------+ +--------+--------+ 73 | /// | ^ 74 | /// FUZZER | | 75 | /// -------------------|---------------------------|----------------------- 76 | /// HYPERVISOR | | 77 | /// v | 78 | /// +--------+--------+ +--------+--------+ 79 | /// | EXCEPTION |-------->| SETUP CACHE | 80 | /// | HANDLING | | MAINTENANCE | 81 | /// +-----------------+ +-----------------+ 82 | /// ``` 83 | /// 84 | /// Before resuming the execution of the Vcpu and entering the cache maintenance handler, we 85 | /// store the address we want to return to, as well as other state registers, on a dedicated stack 86 | /// mapped at address [`STACK_ADDR`]. The handler is entered at EL1, the cache maintenance 87 | /// operation is performed, the original state is loaded and we perform an `eret` instruction to 88 | /// resume the execution at the original exception level. 89 | pub struct Caches; 90 | 91 | impl Caches { 92 | /// Maps and writes the cache maintenance handlers at address [`HANDLERS_ADDR`]. 93 | pub fn init(vcpu: &mut av::Vcpu, vma: &mut VirtMemAllocator) -> Result<()> { 94 | // EL1 stack initialization 95 | vma.map_privileged(STACK_ADDR, STACK_SIZE, av::MemPerms::RW)?; 96 | vcpu.set_sys_reg(av::SysReg::SP_EL1, STACK_ADDR)?; 97 | // Executable page containing the cache maintenance handlers. 98 | vma.map_privileged(HANDLERS_ADDR, HANDLERS_MEM_SIZE, av::MemPerms::RX)?; 99 | let handlers = vec![ 100 | // IC IVAU - 0xffff_ffff_fffe_0000 101 | String::from( 102 | "msr tpidr_el1, x0 103 | mov x0, 1 104 | msr spsel, x0 105 | ldr x0, [sp, #0x8] 106 | msr spsr_el1, x0 107 | ldr x0, [sp] 108 | msr elr_el1, x0 109 | ic ivau, x0 110 | dsb ish 111 | isb 112 | mrs x0, tpidr_el1 113 | eret", 114 | ), 115 | // TLBI VMALLE1 + IC ALLUIS - 0xffff_ffff_fffe_0080 116 | String::from( 117 | "tlbi vmalle1 118 | dsb ish 119 | ic ialluis 120 | dsb ish 121 | isb 122 | msr tpidr_el1, x0 123 | mov x0, 1 124 | msr spsel, x0 125 | ldr x0, [sp, #0x8] 126 | msr spsr_el1, x0 127 | ldr x0, [sp] 128 | msr elr_el1, x0 129 | mrs x0, tpidr_el1 130 | eret", 131 | ), 132 | // TLBI VAAE1 (on fault) - 0xffff_ffff_fffe_0180 133 | String::from( 134 | "msr tpidr_el1, x0 135 | mov x0, 1 136 | msr spsel, x0 137 | ldr x0, [sp, #0x8] 138 | msr spsr_el1, x0 139 | ldr x0, [sp] 140 | msr elr_el1, x0 141 | mrs x0, far_el1 142 | lsr x0, x0, 12 143 | dsb ishst 144 | tlbi vaae1, x0 145 | dsb ish 146 | isb 147 | mrs x0, tpidr_el1 148 | eret", 149 | ), 150 | // TLBI VAAE1 - 0xffff_ffff_fffe_0200 151 | String::from( 152 | "msr tpidr_el1, x0 153 | mov x0, 1 154 | msr spsel, x0 155 | ldr x0, [sp, #0x8] 156 | msr spsr_el1, x0 157 | ldr x0, [sp] 158 | msr elr_el1, x0 159 | ldr x0, [sp, #0x10] 160 | lsr x0, x0, 12 161 | dsb ishst 162 | tlbi vaae1, x0 163 | dsb ish 164 | mrs x0, tpidr_el1 165 | eret", 166 | ), 167 | ]; 168 | // Write all handlers 169 | assert!(handlers.len() < HANDLERS_COUNT); 170 | for (i, asm) in handlers.into_iter().enumerate() { 171 | let handler = KSE.with(|ks| ks.asm(asm, 0).expect("could not assemble")); 172 | assert!(!handler.bytes.is_empty() && handler.bytes.len() < HANDLER_SIZE); 173 | vma.write(HANDLERS_ADDR + (i * HANDLER_SIZE) as u64, &handler.bytes)?; 174 | } 175 | Ok(()) 176 | } 177 | 178 | /// Instruction cache invalidation handler. 179 | /// 180 | /// Executes a `IC IVAU` instruction, which invalidates the instruction cache by virtual 181 | /// address to point of unification. 182 | #[inline] 183 | pub fn ic_ivau(vcpu: &mut av::Vcpu, vma: &mut VirtMemAllocator) -> Result<()> { 184 | // Saving the current context so the handler can use it to return from the exception 185 | // and resume the execution at the right address and exception level. 186 | vma.write_qword(STACK_ADDR, vcpu.get_reg(av::Reg::PC)?)?; 187 | vma.write_qword(STACK_ADDR + 8, vcpu.get_reg(av::Reg::CPSR)?)?; 188 | // Sets CPSR so that we switch the exception level to EL1 and mask exceptions. 189 | vcpu.set_reg(av::Reg::CPSR, 0x3c4)?; 190 | // Sets PC to the instruction cache invalidation handler. 191 | vcpu.set_reg(av::Reg::PC, HANDLERS_ADDR)?; 192 | Ok(()) 193 | } 194 | 195 | /// Translation Lookaside Buffer invalidation and instruction cache invalidation handler. 196 | /// 197 | /// Executes a `TLBI VMALLE1` instruction to invalidate the whole TLB followed by a `IC ALLUIS` 198 | /// instruction to flush the entire instruction cache. 199 | #[inline] 200 | pub fn tlbi_vmalle1_ic_ialluis(vcpu: &mut av::Vcpu, vma: &mut VirtMemAllocator) -> Result<()> { 201 | // Saving the current context so the handler can use it to return from the exception 202 | // and resume the execution at the right address and exception level. 203 | vma.write_qword(STACK_ADDR, vcpu.get_reg(av::Reg::PC)?)?; 204 | vma.write_qword(STACK_ADDR + 8, vcpu.get_reg(av::Reg::CPSR)?)?; 205 | // Sets CPSR so that we switch the exception level to EL1 and mask exceptions. 206 | vcpu.set_reg(av::Reg::CPSR, 0x3c4)?; 207 | // Sets PC to the TLB invalidation handler. 208 | vcpu.set_reg(av::Reg::PC, HANDLERS_ADDR + HANDLER_SIZE as u64)?; 209 | Ok(()) 210 | } 211 | 212 | /// Translation Lookaside Buffer entry invalidation handler used during a data abort. 213 | /// 214 | /// Executes a `TLBI VAAE1` instruction, which invalidates cached copies of translation table 215 | /// entries from TLBs. 216 | #[inline] 217 | pub fn tlbi_vaae1_on_fault(vcpu: &mut av::Vcpu, vma: &mut VirtMemAllocator) -> Result<()> { 218 | // Saving the current context so the handler can use it to return from the exception 219 | // and resume the execution at the right address and exception level. 220 | // We store SPSR_EL1 instead of CPSR, because the data abort that brought us here has 221 | // already changed the original CPSR. 222 | vma.write_qword(STACK_ADDR, vcpu.get_reg(av::Reg::PC)?)?; 223 | vma.write_qword(STACK_ADDR + 8, vcpu.get_sys_reg(av::SysReg::SPSR_EL1)?)?; 224 | // We should be at EL1 since this handler is only called when a data abort occurs, so 225 | // we only set PC to the tlb invalidation handler. 226 | vcpu.set_reg(av::Reg::PC, HANDLERS_ADDR + (HANDLER_SIZE * 2) as u64)?; 227 | Ok(()) 228 | } 229 | 230 | /// Translation Lookaside Buffer entry invalidation handler. 231 | /// 232 | /// Executes a `TLBI VAAE1` instruction, which invalidates cached copies of translation table 233 | /// entries from TLBs. 234 | #[inline] 235 | pub fn tlbi_vaae1(vcpu: &mut av::Vcpu, vma: &mut VirtMemAllocator, addr: u64) -> Result<()> { 236 | // Saving the current context so the handler can use it to return from the exception 237 | // and resume the execution at the right address and exception level. 238 | vma.write_qword(STACK_ADDR, vcpu.get_reg(av::Reg::PC)?)?; 239 | vma.write_qword(STACK_ADDR + 8, vcpu.get_reg(av::Reg::CPSR)?)?; 240 | // Stores the address we want to flush on the stack. 241 | vma.write_qword(STACK_ADDR + 0x10, addr)?; 242 | // Sets CPSR so that we switch the exception level to EL1 and mask exceptions. 243 | vcpu.set_reg(av::Reg::CPSR, 0x3c4)?; 244 | // Sets PC to the TLB invalidation handler. 245 | vcpu.set_reg(av::Reg::PC, HANDLERS_ADDR + (HANDLER_SIZE * 3) as u64)?; 246 | Ok(()) 247 | } 248 | } 249 | -------------------------------------------------------------------------------- /src/error.rs: -------------------------------------------------------------------------------- 1 | //! Contains all error types that can be returned by this crate. 2 | 3 | use std::alloc; 4 | use std::error; 5 | use std::fmt; 6 | use std::io; 7 | 8 | /// Convenient `Result` type for custom errors. 9 | pub type Result = std::result::Result; 10 | 11 | // ----------------------------------------------------------------------------------------------- 12 | // Errors - General 13 | // ----------------------------------------------------------------------------------------------- 14 | 15 | /// Main error structure which is just a simple wrapper for all errors that can be returned by the 16 | /// fuzzer. 17 | #[derive(Clone, Debug, Eq, PartialEq)] 18 | pub enum Error { 19 | /// Core-related errors. 20 | Core(CoreError), 21 | /// Crash-related errors. 22 | Crash(CrashError), 23 | /// Exception-related errors. 24 | Exception(ExceptionError), 25 | /// Hook-related errors. 26 | Hook(HookError), 27 | /// Hypervisor-related errors. 28 | Hypervisor(applevisor::HypervisorError), 29 | /// Loader-related errors. 30 | Loader(LoaderError), 31 | /// Memory-related errors. 32 | Memory(MemoryError), 33 | /// Generic user-defined errors. 34 | Generic(String), 35 | } 36 | 37 | impl error::Error for Error {} 38 | 39 | impl fmt::Display for Error { 40 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 41 | match self { 42 | Error::Core(e) => write!(f, "[Core error] {}", e), 43 | Error::Crash(e) => write!(f, "[Crash error] {}", e), 44 | Error::Exception(e) => write!(f, "[Exception error] {}", e), 45 | Error::Hook(e) => write!(f, "[Hook error] {}", e), 46 | Error::Loader(e) => write!(f, "[Loader error] {}", e), 47 | Error::Memory(e) => write!(f, "[Memory error] {}", e), 48 | Error::Hypervisor(e) => write!(f, "[Hypervisor error] {}", e), 49 | Error::Generic(e) => write!(f, "[Error] {}", e), 50 | } 51 | } 52 | } 53 | 54 | impl From for Error { 55 | fn from(error: CoreError) -> Self { 56 | Error::Core(error) 57 | } 58 | } 59 | 60 | impl From for Error { 61 | fn from(error: CrashError) -> Self { 62 | Error::Crash(error) 63 | } 64 | } 65 | 66 | impl From for Error { 67 | fn from(error: ExceptionError) -> Self { 68 | Error::Exception(error) 69 | } 70 | } 71 | 72 | impl From for Error { 73 | fn from(error: HookError) -> Self { 74 | Error::Hook(error) 75 | } 76 | } 77 | 78 | impl From for Error { 79 | fn from(error: LoaderError) -> Self { 80 | Error::Loader(error) 81 | } 82 | } 83 | 84 | impl From for Error { 85 | fn from(error: MemoryError) -> Self { 86 | Error::Memory(error) 87 | } 88 | } 89 | 90 | impl From for Error { 91 | fn from(error: applevisor::HypervisorError) -> Self { 92 | Error::Hypervisor(error) 93 | } 94 | } 95 | 96 | impl From for Error { 97 | fn from(error: alloc::LayoutError) -> Self { 98 | Error::Memory(MemoryError::LayoutError(error)) 99 | } 100 | } 101 | 102 | impl From for Error { 103 | fn from(error: std::fmt::Error) -> Self { 104 | Error::Crash(CrashError::FmtError(error)) 105 | } 106 | } 107 | 108 | impl From for Error { 109 | fn from(error: io::Error) -> Self { 110 | Error::Core(CoreError::IoError(format!("{}", error))) 111 | } 112 | } 113 | 114 | // ----------------------------------------------------------------------------------------------- 115 | // Errors - Core 116 | // ----------------------------------------------------------------------------------------------- 117 | 118 | /// Core-related errors. 119 | #[derive(Clone, Debug, Eq, PartialEq)] 120 | pub enum CoreError { 121 | InvalidConfiguration, 122 | /// The corpus at the specified path is empty. 123 | EmptyCorpus(String), 124 | /// Corpus testcase generated a crash. 125 | CorpusCrash(std::path::PathBuf), 126 | /// The testcase provided is invalid. 127 | InvalidTestcase, 128 | /// An I/O error occured while processing the corpus. 129 | IoError(String), 130 | /// Too many workers are trying to be spawned. 131 | TooManyWorkers(u32), 132 | /// User-defined core error. 133 | Generic(String), 134 | } 135 | 136 | impl error::Error for CoreError {} 137 | 138 | impl fmt::Display for CoreError { 139 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 140 | match self { 141 | CoreError::InvalidConfiguration => write!(f, "invalid configuration type"), 142 | CoreError::EmptyCorpus(e) => write!(f, "corpus at {} is empty", e), 143 | CoreError::CorpusCrash(p) => { 144 | write!(f, "a corpus element crashed the fuzzer: {}", p.display()) 145 | } 146 | CoreError::InvalidTestcase => write!(f, "testcase is invalid"), 147 | CoreError::IoError(e) => write!(f, "{}", e), 148 | CoreError::TooManyWorkers(n) => write!(f, "maximum number of workers reached ({})", n), 149 | CoreError::Generic(e) => write!(f, "{}", e), 150 | } 151 | } 152 | } 153 | 154 | // ----------------------------------------------------------------------------------------------- 155 | // Errors - Crash 156 | // ----------------------------------------------------------------------------------------------- 157 | 158 | /// Crash-related errors. 159 | #[derive(Clone, Debug, Eq, PartialEq)] 160 | pub enum CrashError { 161 | /// A format error occured. 162 | FmtError(std::fmt::Error), 163 | /// User-defined core error. 164 | Generic(String), 165 | } 166 | 167 | impl error::Error for CrashError {} 168 | 169 | impl fmt::Display for CrashError { 170 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 171 | match self { 172 | CrashError::FmtError(e) => write!(f, "{}", e), 173 | CrashError::Generic(e) => write!(f, "{}", e), 174 | } 175 | } 176 | } 177 | 178 | // ----------------------------------------------------------------------------------------------- 179 | // Errors - Exception 180 | // ----------------------------------------------------------------------------------------------- 181 | 182 | /// Exception-related errors. 183 | #[derive(Clone, Debug, Eq, PartialEq)] 184 | pub enum ExceptionError { 185 | /// The exception type is not implemented. 186 | UnimplementedException(u64), 187 | /// User-defined exception error. 188 | Generic(String), 189 | } 190 | 191 | impl error::Error for ExceptionError {} 192 | 193 | impl fmt::Display for ExceptionError { 194 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 195 | match self { 196 | ExceptionError::UnimplementedException(e) => { 197 | write!(f, "unimplemented exception ({:?})", e) 198 | } 199 | ExceptionError::Generic(e) => write!(f, "{}", e), 200 | } 201 | } 202 | } 203 | 204 | // ----------------------------------------------------------------------------------------------- 205 | // Errors - Hook 206 | // ----------------------------------------------------------------------------------------------- 207 | 208 | /// Hook-related errors. 209 | #[derive(Clone, Debug, Eq, PartialEq)] 210 | pub enum HookError { 211 | /// The hook already exists at this address. 212 | HookAlreadyExists(u64), 213 | /// The hook type is invalid. 214 | InvalidHookType(u16), 215 | /// There is no hook at the given address. 216 | UnknownHook(u64), 217 | /// User-defined hook error. 218 | Generic(String), 219 | } 220 | 221 | impl error::Error for HookError {} 222 | 223 | impl fmt::Display for HookError { 224 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 225 | match self { 226 | HookError::HookAlreadyExists(a) => write!(f, "hook already exists ({:#x})", a), 227 | HookError::InvalidHookType(t) => write!(f, "invalid hook type ({:#x})", t), 228 | HookError::UnknownHook(a) => write!(f, "unknown hook ({:#x})", a), 229 | HookError::Generic(e) => write!(f, "{}", e), 230 | } 231 | } 232 | } 233 | 234 | // ----------------------------------------------------------------------------------------------- 235 | // Errors - Loader 236 | // ----------------------------------------------------------------------------------------------- 237 | 238 | /// Loader-related errors. 239 | #[derive(Clone, Debug, Eq, PartialEq)] 240 | pub enum LoaderError { 241 | /// The symbol is unknown. 242 | UnknownSymbol(String), 243 | /// User-defined loader error. 244 | Generic(String), 245 | } 246 | 247 | impl error::Error for LoaderError {} 248 | 249 | impl fmt::Display for LoaderError { 250 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 251 | match self { 252 | LoaderError::UnknownSymbol(s) => write!(f, "unknown symbol: {}", s), 253 | LoaderError::Generic(e) => write!(f, "{}", e), 254 | } 255 | } 256 | } 257 | 258 | // ----------------------------------------------------------------------------------------------- 259 | // Errors - Memory 260 | // ----------------------------------------------------------------------------------------------- 261 | 262 | /// Memory-related errors. 263 | #[derive(Clone, Debug, Eq, PartialEq)] 264 | pub enum MemoryError { 265 | /// The address we're trying to map already exists in the page table. 266 | AlreadyMapped(u64), 267 | /// The slab is an unexpected state. 268 | CorruptedSlab, 269 | /// The address is invalid. 270 | InvalidAddress(u64), 271 | /// The index is invalid. 272 | InvalidIndex(usize), 273 | /// The size is invalid. 274 | InvalidSize(usize), 275 | /// Wrapper for `alloc::LayoutError`. 276 | LayoutError(alloc::LayoutError), 277 | /// The allocator is out of memory. 278 | OutOfMemory, 279 | /// The operation between an address and a size resulted in an overflow. 280 | Overflow(u64, usize), 281 | /// The address is not aligned as expected. 282 | UnalignedAddress(u64), 283 | /// The size is not aligned as expected. 284 | UnalignedSize(usize), 285 | /// The address we're trying to access has not been allocated. 286 | UnallocatedMemoryAccess(u64), 287 | /// User-defined memory error. 288 | Generic(String), 289 | } 290 | 291 | impl error::Error for MemoryError {} 292 | 293 | impl fmt::Display for MemoryError { 294 | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 295 | match self { 296 | MemoryError::AlreadyMapped(a) => write!(f, "address is already mapped: {:#x}", a), 297 | MemoryError::CorruptedSlab => write!(f, "corrupted slab"), 298 | MemoryError::InvalidAddress(a) => write!(f, "invalid address: {:#x}", a), 299 | MemoryError::InvalidIndex(i) => write!(f, "invalid index: {:#x}", i), 300 | MemoryError::InvalidSize(s) => write!(f, "invalid size: {:#x}", s), 301 | MemoryError::LayoutError(e) => write!(f, "layout error: {}", e), 302 | MemoryError::OutOfMemory => write!(f, "the allocator ran out of memory"), 303 | MemoryError::Overflow(a, s) => write!(f, "an overflow occured: {:#x}, {:#x}", a, s), 304 | MemoryError::UnalignedAddress(a) => write!(f, "unaligned address: ({:#x})", a), 305 | MemoryError::UnalignedSize(s) => write!(f, "unaligned size: ({:#x})", s), 306 | MemoryError::UnallocatedMemoryAccess(x) => { 307 | write!(f, "access to unallocated memory at address {:#x}", x) 308 | } 309 | MemoryError::Generic(e) => write!(f, "{}", e), 310 | } 311 | } 312 | } 313 | -------------------------------------------------------------------------------- /src/corpus.rs: -------------------------------------------------------------------------------- 1 | //! Handles the corpus and testcases sent to the fuzzed targets. 2 | 3 | use std::fs::{read_dir, OpenOptions}; 4 | use std::io::{Read, Write}; 5 | use std::path::{Path, PathBuf}; 6 | use std::sync::{Arc, RwLock}; 7 | use std::time::Duration; 8 | 9 | use rhexdump as rh; 10 | 11 | use crate::coverage::*; 12 | use crate::error::*; 13 | use crate::utils::*; 14 | 15 | /// Determines which action should be taken after a testcase has been loaded by the fuzzer. 16 | /// Because a given testcase can be reused across multiple iterations, it's possible to tell the 17 | /// fuzzer whether we want to keep it and use the remaining data for the next iteration or discard 18 | /// it and get a new one. 19 | #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] 20 | pub enum LoadTestcaseAction { 21 | /// Once the current testcase is loaded, we discard it and get a new one for the next 22 | /// iteration. Doesn't reset the fuzzer from the snapshots. 23 | New, 24 | /// Once the current testcase is loaded, we discard it and get a new one for the next 25 | /// iteration. Resets the fuzzer using the snapshots. 26 | NewAndReset, 27 | /// If there is still data in the current testcase that can be used for the next iteration, 28 | /// we keep it. Doesn't reset the fuzzer from the snapshots. 29 | Keep, 30 | /// If there is still data in the current testcase that can be used for the next iteration, 31 | /// we keep it. Resets the fuzzer using the snapshots. 32 | KeepAndReset, 33 | /// The testcase is invalid, a new one will be fetched and loaded right away. Doesn't reset 34 | /// the fuzzer from the snapshots. 35 | Invalid, 36 | /// The testcase is invalid, a new one will be fetched and loaded right away. Resets the 37 | /// fuzzer using the snapshots. 38 | InvalidAndReset, 39 | } 40 | 41 | /// Represents the input executed during one iteration of the fuzzer. 42 | #[derive(Clone, Eq, PartialEq, Hash, Debug)] 43 | pub struct Testcase { 44 | /// The path to the testcase on disk. 45 | pub(crate) path: Option, 46 | /// The seed that helped generate the testcase (used for name generation). 47 | pub(crate) seed: Option, 48 | /// The time it took for the testcase to run. 49 | pub(crate) exec_time: Duration, 50 | /// The coverage associated to this testcase. 51 | pub(crate) coverage: Coverage, 52 | /// The testcase's content. 53 | pub(crate) data: Vec, 54 | } 55 | 56 | impl Testcase { 57 | /// Creates a new testcase from a slice. 58 | pub fn new(seed: u64, data: &[u8]) -> Self { 59 | Self { 60 | path: None, 61 | seed: Some(seed), 62 | exec_time: Duration::new(0, 0), 63 | coverage: Coverage::new(), 64 | data: data.to_vec(), 65 | } 66 | } 67 | 68 | /// Loads a testcase from the file located at `filepath`. 69 | pub fn from_file(filepath: impl AsRef) -> Result { 70 | let mut testcase = OpenOptions::new().read(true).open(&filepath)?; 71 | let mut data = vec![]; 72 | testcase.read_to_end(&mut data)?; 73 | Ok(Self { 74 | path: Some(filepath.as_ref().to_owned()), 75 | seed: None, 76 | exec_time: Duration::new(0, 0), 77 | coverage: Coverage::new(), 78 | data, 79 | }) 80 | } 81 | 82 | /// Writes a testcase into the `dir` directory. 83 | pub fn to_file(&self, dir: impl AsRef) -> Result<()> { 84 | let filepath = self.filepath(dir); 85 | let mut testcase = OpenOptions::new().create(true).write(true).open(filepath)?; 86 | testcase.write_all(&self.data)?; 87 | Ok(()) 88 | } 89 | 90 | /// Returns the testcase's size. 91 | pub fn len(&self) -> usize { 92 | self.data.len() 93 | } 94 | 95 | /// Returns if the testcase is empty. 96 | pub fn is_empty(&self) -> bool { 97 | self.data.len() == 0 98 | } 99 | 100 | /// Returns an immutable reference to the testcase data. 101 | pub fn get_data(&self) -> &[u8] { 102 | &self.data 103 | } 104 | 105 | /// Returns a mutable reference to the testcase data. 106 | pub fn get_data_mut(&mut self) -> &mut Vec { 107 | &mut self.data 108 | } 109 | 110 | /// Sets the seed used to generate the testcase. 111 | pub fn set_seed(&mut self, seed: u64) { 112 | self.seed = Some(seed); 113 | } 114 | 115 | /// Generates a random testcase filepath in the corpus directory. 116 | fn filepath(&self, dir: impl AsRef) -> PathBuf { 117 | let fmt = 118 | time::format_description::parse("[year][month][day]-[hour][minute][second]").unwrap(); 119 | // We can unwrap safely here, because testcases without a seed are those that were loaded 120 | // from the corpus, so they shouldn't be written back without having their seed set after 121 | // having been mutated. 122 | let seed = self.seed.unwrap(); 123 | dir.as_ref().join(PathBuf::from(format!( 124 | "testcase_{}_{:x}", 125 | time::OffsetDateTime::now_utc().format(&fmt).unwrap(), 126 | seed, 127 | ))) 128 | } 129 | } 130 | 131 | impl std::default::Default for Testcase { 132 | fn default() -> Self { 133 | Testcase::new(0, &[]) 134 | } 135 | } 136 | 137 | impl std::fmt::Display for Testcase { 138 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 139 | write!(f, "{}", rh::hexdump(&self.data)) 140 | } 141 | } 142 | 143 | /// The non-shareable inner structure of [`Corpus`] that contains the testcases. 144 | #[derive(Clone, Eq, PartialEq, Hash, Debug)] 145 | pub struct CorpusInner { 146 | /// Path to the inputs directory. 147 | pub(crate) path: PathBuf, 148 | /// Vector containing tuples of [`Testcase`]s and the number of use of each testcase. 149 | /// This vector is sorted by number of uses, from the most used testcase to the least used one. 150 | pub(crate) testcases: Vec<(usize, Testcase)>, 151 | /// The corpus random generator used to choose the next testcase. 152 | pub(crate) rand: Random, 153 | } 154 | 155 | impl CorpusInner { 156 | /// Creates a new inner corpus structure. 157 | fn new(rand: Random, path: PathBuf) -> Result { 158 | Ok(Self { 159 | path, 160 | testcases: vec![], 161 | rand, 162 | }) 163 | } 164 | } 165 | 166 | /// The corpus containing testcases shared between all fuzzing workers. 167 | /// 168 | /// # Role of the Corpus in the Fuzzer. 169 | /// 170 | /// Our mutation-based fuzzer needs an initial set of testcases to start running. These testcases 171 | /// are stored in the corpus and can be loaded from a directory using [`Corpus::load_from_dir`]. 172 | /// 173 | /// The fuzzer currently does not implement corpus minimization, a process that removes as many 174 | /// testcases as possible without reducing coverage. While implementing such a system would 175 | /// distill the current corpus to its essence, we would effectively lose out on information that 176 | /// might have been useful for later iterations (e.g. a testcase that sets up an internal state 177 | /// that would trigger a bug after being mutated for a few times). Instead, this fuzzer keeps all 178 | /// testcases, but favors the least used ones when picking the next testcase using 179 | /// [`Corpus::get_testcase`]. 180 | #[derive(Clone, Debug)] 181 | pub struct Corpus { 182 | pub(crate) inner: Arc>, 183 | } 184 | 185 | impl Corpus { 186 | /// Creates a new shared corpus. 187 | pub fn new( 188 | rand: Random, 189 | corpus_path: impl AsRef, 190 | work_dir: impl AsRef, 191 | load_corpus: bool, 192 | ) -> Result { 193 | let mut inputs_path = work_dir.as_ref().to_owned(); 194 | inputs_path.push("inputs"); 195 | // Creates the directory containing the inputs queued for mutation. 196 | std::fs::create_dir_all(&inputs_path)?; 197 | // Copies the file from the corpus directory into the inputs directory if corpus loading is 198 | // enabled. 199 | if load_corpus && corpus_path.as_ref().exists() { 200 | for corpus_entry in read_dir(&corpus_path)? { 201 | let corpus_entry = corpus_entry?; 202 | let corpus_entry_path = corpus_entry.path(); 203 | // Ignores subdirectories. 204 | if !corpus_entry_path.is_dir() { 205 | let mut inputs_entry_path = inputs_path.clone(); 206 | inputs_entry_path.push(corpus_entry.file_name()); 207 | std::fs::copy(corpus_entry_path, inputs_entry_path)?; 208 | } 209 | } 210 | } 211 | Ok(Self { 212 | inner: Arc::new(RwLock::new(CorpusInner::new(rand, inputs_path)?)), 213 | }) 214 | } 215 | 216 | /// Loads all testcases stored in the `path` directory. 217 | pub fn load_from_dir(&mut self, max_size: usize) -> Result<()> { 218 | let mut inner = self.inner.write().unwrap(); 219 | // Iterates over each entry in `path`. 220 | for entry in read_dir(&inner.path)? { 221 | let entry = entry?; 222 | let path = entry.path(); 223 | // Ignores subdirectories. 224 | if !path.is_dir() { 225 | let testcase = Testcase::from_file(path)?; 226 | // Testcases that are too big are ignored. 227 | // TODO: maybe add a config option to decide between ignoring the testcase, 228 | // truncating it, or raising an error. 229 | if testcase.len() > max_size { 230 | continue; 231 | } 232 | inner.testcases.push((0, testcase)); 233 | } 234 | } 235 | Ok(()) 236 | } 237 | 238 | /// Adds a testcase to the shared corpus. 239 | pub fn add_testcase(&mut self, testcase: Testcase) -> Result<()> { 240 | let mut inner = self.inner.write().unwrap(); 241 | // We write the testcase into the corpus directory. 242 | testcase.to_file(&inner.path)?; 243 | // When we push this testcase at the end we don't need to sort the array, because a 244 | // new testcase is guarenteed to be the least used one. 245 | inner.testcases.push((0, testcase)); 246 | Ok(()) 247 | } 248 | 249 | /// Gets one testcase from the shared corpus (the least used are more likely to be selected 250 | /// next). 251 | pub fn get_testcase(&mut self) -> Testcase { 252 | let mut inner = self.inner.write().unwrap(); 253 | let corpus_len = inner.testcases.len() as u64; 254 | if corpus_len == 0 { 255 | return Testcase::default(); 256 | } 257 | // Generates a random index in the corpus using an exponential distribution. 258 | // to select, on average, less used testcases that are the least used (those towards the 259 | // end of the vector) 260 | let idx = corpus_len - 1 - inner.rand.exp_range(0, corpus_len).unwrap(); 261 | let testcase = if let Some((count, testcase)) = inner.testcases.get_mut(idx as usize) { 262 | *count += 1; 263 | testcase.clone() 264 | } else { 265 | // We've checked earlier that the corpus has at least one testcase. 266 | unreachable!(); 267 | }; 268 | // Sorts the vector by number of testcases, from the most used one to the least used one. 269 | inner.testcases.sort_unstable_by(|a, b| b.0.cmp(&a.0)); 270 | // Returns the testcase was extracted. 271 | testcase 272 | } 273 | 274 | /// Returns the numbers of testcases in the corpus. 275 | pub fn nb_entries(&self) -> usize { 276 | self.inner.read().unwrap().testcases.len() 277 | } 278 | } 279 | --------------------------------------------------------------------------------