added non digit rand val fuzzing encoding tests
authorMichael Rash <mbr@cipherdyne.org>
Sun, 28 Oct 2012 02:45:28 +0000 (22:45 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sun, 28 Oct 2012 02:45:28 +0000 (22:45 -0400)
test/fuzzing/fuzzing_spa_packets
test/fuzzing/patches/encoding_non_digit_rand_val.patch [new file with mode: 0644]

index 1eee68c..958bd13 100644 (file)
 [+] Invalid_encoding msg_type: encoded_append_b64_strip_eq_return_3, SPA packet: +Q5Th5Xm9QpLcOFL1Wy8YgdoJJASmR0BlQy23nsZ6xDNAsEHaWhd22MHrz2slv1dHmOYU6lMPaYkkbY950nYAcUS6Ho+mVYY6FyB6opHL2EgOw0HKu2KvERlUCHVCt47JruCjdFdH+ITA/0LuQqpPyhJcEIOeG770=
 [+] Invalid_encoding msg_type: encoded_append_b64_strip_eq_return_4, SPA packet: /Qu3EXTwAfxFdNsBFTnOWT35slJy1oBfS9NKaFhLrUiBT+nEX8hLFvR4KGPC6Wg1E4U4q2cjfLFLhO3SanE0UJwScb6nidnHu3eyUnELan7v0a0BL5A1NldlB+Mwz+yqq0KW7hPC+3nrZDENL/uPGBSgvb0XfevQE=
 [+] Invalid_encoding msg_type: encoded_append_b64_strip_eq_return_6, SPA packet: 8qrlzmOu4qfwztgJ1OZHDO5FN1rg9V7EiV5b1oOowrP3GjziiTXJq2FjTs3TUBnyXrSLaNFJf8MF741Q6sIGPyA8efEQUOi5Rpt4azvFg3/UItdPHDQ6lFDPvFVdZhEElSDAmGMadvklUbJ1VTV8lJGezISk4WpS0=
+[+] Invalid_encoding user: encoded_non_digit_rand_val_test, SPA packet: 9MhsqQHbsRXB+/gvCTP4ijkvKss+8aAe8+7q2OZ5spFUiuqHQRRYdhPQtxLhdn+en44V9GfUpVfPH97BdoHqT+8GQhaZ0ScRhaODbgEUeGdLKDWsxze7gc1c3/Fq6JLyfQnz0gVjEH4t1N407Kf2BwNIPp1jfYOjE
+[+] Invalid_encoding user: encoded_non_digit_rand_val_root, SPA packet: +GmGWueJF2fZuie6vKtcOKYKnFuB8w+CU6SIIffIGautsK4SONwmuNVNQi7fIGbXqXhNxfKSwI3VeNNoWwJYCM8lReQK17LnjJ0OqCRP+Czs0gbwcTnTL/CsxbtmHNH7obmuGP88yIRvfkDp2WONwvPwE1j6NXMnE
+[+] Invalid_encoding user: encoded_non_digit_rand_val_mbr, SPA packet: 8h0bIo7RFAyV3kzdelY9GABNaDhhcAbF+XNlJhOs//4CmW5Fj+T/H8xQY/X1DoarhpKGfAfMuQD1PQKFX0PD7R9daw5to+saia4Rxlk3eO63wBv0gHM97JGlTt/QtRPbui6Rck0EIa3zdV7jPT7O/Wg5Kzf/AyaJo
+[+] Invalid_encoding user: encoded_non_digit_rand_val_test-test, SPA packet: /+BcgBRbCl77GDDhTk3/h3+QjJNAoyNyTMePo3iCEUgYM2gppOs68LDLwe3+46SDhKFp7mKWDgFpnXvx3m0FmOGrg/VDnXL5yhRpnmFsCzx1OGVyfm/vmC7HkcMe4CKO1mzpaX27H3GozNmNuzS4ae+qUMezjLFQ8
+[+] Invalid_encoding user: encoded_non_digit_rand_val_someuser, SPA packet: 9rxgcnXb4hfrbirHpDDjJBTLkTY9WaepGAgR7trnKMs72NgDK0MlyMhEc2TxP02FICsHcO6EZYVclF0VsYpHa1cEUP1uZqwE/lnGyk59sq1h9EomPlBu9wbdTQbfKD32ytbUh+bOCSqsbqFIpXbbL8FNfetCYwcRI
+[+] Invalid_encoding user: encoded_non_digit_rand_val_someUser, SPA packet: 9muyEcETud8ZRb4Pj9bVVobjBHor8zYHdU0kryZFvXHvGH+7rJZ1Oe6046TDe3s8x8Yz03LWs9CUXn5Pz8vkYqST5ghF2X2/7aFUdL5RDV6CgEL3t35t5tEJ6cQ5CadzCuMha/UAEx+HoXYgal0Fu0WJo1rYLbNnM
+[+] Invalid_encoding user: encoded_non_digit_rand_val_USER, SPA packet: 9qplY+oJvESdxWfAGXMflKZuAfrcs92wtUVZmcQxHbfWXa+RevRjezrsH6vqr3AZ3G/utkrujUTaZs/XhEYlxnAINPMuq4E6/8urUI8RmZoUbddi6MZ/4P2+imS+AmfAS/2BMkVEbMJ+Mf8hIKJNE5OTsY+trSXoI
+[+] Invalid_encoding user: encoded_non_digit_rand_val_USER001, SPA packet: +cWY4eOQnpCNxBcUeM1HHNU0Sy68bJqF1k4mRJxl8al1AqLpa6lOOiRmavsuPPLhV5jb5I8Q2OuSNafATnbrfPx1z2ryj9SwxaUHxh3uKf8DFFvhgkj478bhHEGENy1fAwjVEWlQATwPgYpTN2CGmi2GaCVMIb9qM
+[+] Invalid_encoding user: encoded_non_digit_rand_val_00001, SPA packet: 9DJvw3OajKeLxn/lCSyQ3ZY9dC1hqQNp1HpxHhnsf7a89Uh7pAioxMA2HEDfJOdSCvlqAcz32Qatj04U+nsd91hUvJ0aktm/43+pVCZkIPR4+y0IoZ64MFaj8ihN3SqcoU7X7ENDVK4KFr+6auYLnKLJIpOjxzK/Q
+[+] Invalid_encoding access_msg: encoded_non_digit_rand_val_1.2.3.4,tcp/22, SPA packet: /h5bgvS83VPWgKXTJ4EPMp4xVgp2v4XWP4o8fvuA4E5BbMtzfUmIRdXWO+dxqXSON4QS939E9RXsIyS07q8+HvF2mpEuFx4+kc/YVTdtwoaUT22QuOQk69zh+AlHuXGky3IS5syObMykzW8r4qMsGAoMB12nCb9hA
+[+] Invalid_encoding access_msg: encoded_non_digit_rand_val_123.123.123.123,tcp/12345, SPA packet: 9dCs8Gmn5BmmSBJn/SUTMOzcVrNnRPe3S/82r4JBwFkGKZcv3t6Y5tyim6dKeDmdxOynfrw8zrFfPLmvmXwH9UeaBSBHLTyXI4stgcy2ncJ/pDWFeOciMkQH4YwvPbgVVywOEXPTHkqldZezsDq0lOXtPAzccqGc3v1eTaVh/4Q9K7boJLkaZv
+[+] Invalid_encoding access_msg: encoded_non_digit_rand_val_1.2.3.4,udp/53, SPA packet: +ZSpnGRuwfKZZEOd4P0IzjKuKy2ijdQ0OgYqa8tawTm8Ya8RWDRFIRewrHSzbnuc9H8QiPzDzyPjeltC2EblXse91OHdTaSOy5raUqnLwY393wwlO/1PRd+KjtISITjyOCdEn8CVgmYvHrRyRKQcJiw2NXER43jzQ
+[+] Invalid_encoding access_msg: encoded_non_digit_rand_val_123.123.123.123,udp/12345, SPA packet: 9uF/dcg3vJVmxc+YOyYG0RoE1KuJ9WnBPdyx2wrkROsVb7g+ZrW3eweCJqnkrvVrLyLUGBbPDEFPoN7Vt5Y7xU/4R270Tmp55cP8nAHV5cq/EHeOi4ILXBVgs7MUiJYBuQLbj3r5AZ0Phv7xQtOot+6S0sbsN9gqJLTc9lQ2M1zcm30eZ/8ran
+[+] Invalid_encoding access_msg: encoded_non_digit_rand_val_123.123.123.123,udp/12345,tcp/12345, SPA packet: /J4AOfzGFiGK+t7nRYsqMiNXotJRuJw4lG7soosnDBudZFSMVtrg6h9NB0jKQXowHQ/3LRbqxc9sVdL/rhYq67EGOrnGCbrq2GamEWE/FGmaBJjzEWTHDI8wYADrW9oaMDo8zH3DEhOmepjd9GSwX8scKqxtZt7wAl+MRTbtxMPLhBzTUmbD6LUvQRqp+u4Z6Z4Bb2CYAVlg
+[+] Invalid_encoding access_msg: encoded_non_digit_rand_val_1.1.1.1,udp/1,tcp/1,tcp/2,udp/3,tcp/4,tcp/12345, SPA packet: +qzlwTRGqTXJc+OxieIICsmu9YAe/vbKi6EL9Zuh3kHPiJwR9j9h+PywCfGBGNgqMlNSOEBv7wRwtHyFIo/tXdLzJfxv+eth7JanHcCDeaKzE3Y4NAmcwsWK1ZQ3Spt2zhYl8Cx/7Q/OdGrHJi2OFYKMu/C4t+xM7RJzcofqw0+lSshhkji8ioTWSRYu5evKtJQR5aHQKORmyq7LsMzBhNE/kN+Q8RM8I
+[+] Invalid_encoding NAT_access_msg: encoded_non_digit_rand_val_1.2.3.4,22, SPA packet: /EDqNTBPr+O1uKuI2Z2C60geGoj1vn4JAtYxL/XBeydgonOuTX2BpRVAInmvjBfgBLx8I3O+PfcN/pbe59WQ2bvcgQA4BgivduRcC1vhYtdpbC9adtNuzY1uk6DDJUD5LyKnd0eRqNkWzqDoPBHOlD+A7qZY5O9acGRrnLly4spJhIwlXlMnNo
+[+] Invalid_encoding NAT_access_msg: encoded_non_digit_rand_val_123.123.123.123,12345, SPA packet: +wCyv1enWHyuBcgQIM3TdQgXCSWQWyGJKp/wDZ3q8MZYsz/OopkMsKmPInIEtXuXOhoSoqV/yJsKVzWNUXMAxDpUNIM8pGMpolV9COwnPmA+RlX/JmgGe2uF73xz8zV1X2ICkMti4+SgJXmoaiUIiXCnBRRXwN+VAgL+go6ROX20rqJco1bmRx2xB7jEiGc4X5C0V1la2kgQ
+[+] Invalid_encoding cmd_msg: encoded_non_digit_rand_val_1.2.3.4,cat /etc/hosts, SPA packet: +85dvbMA06njMkjSm8KZvHu1kzfjipBNX8V1pedRknbG+5fIEnlQtZNvFAOdeGmfqBdMufD64gKjEsgDsVwWoc9fmcDgOQA+cgQ8eweV9JTq8QNJwHAWx32pNnR6thyH0XibwpNWxp+eIpSOn2zx7qiijy1VH0y2mKCTH48WDoRt3CKyQ6bzeq
+[+] Invalid_encoding cmd_msg: encoded_non_digit_rand_val_123.123.123.123,cat /etc/hosts, SPA packet: +ROxs9ywMsBMGuGCTbKLPHs0OOXp77R6RXX7hGkmBHpigxdoa+gJ6NcKUT6bhCb6bvrPhKhu1yu/6SF2WOhsnYI+B0oDLPvPd7yW642LkkWrjZbvYjlVbQgbLJXroMZvvs3NEdOw2/ih19U3EMsfnvspDjSkPC4VfFEVhcO2HRc2oplXqsl+9C
+[+] Invalid_encoding cmd_msg: encoded_non_digit_rand_val_123.123.123.123,echo blah > /some/file, SPA packet: /vauoY/MUzsyzdCr0iUORWfEYTbzGuN5qEL+0+Q20IWUIDq5qtLCM6trzWE2fl5uJUSMCYtUaFPGX5078zbrl4QJLxicx29GgUt0gCKk77drxcfFvGN9RkSNP24/Dx3rGxzCII6IwVb9WhykAM1I/FmyPEH6Cf+ebkCl8CshuNssssL4pnW5WliL1MuMqiaS9FrYw04AKgxQ
+[+] Invalid_encoding cmd_msg: encoded_non_digit_rand_val_1.1.1.1,echo blah > /some/file, SPA packet: 8523v75+h2idjpdHY3GvJK+ULnBoeViD9PXywCGMAA82bp/1hvW3dmDiAZbVQQ0NKgb45Q4jsgfyvrIpSeDQz+7jDDE3oZru9LsYKOvOpUPM3eX5zEuWr0XeKs48ZCFDK0tFYiJXcvQavgS/11G5K4eRW2zr0y/VNrkHMvVB+bMwtQcu3ISepi
+[+] Invalid_encoding cmd_msg: encoded_non_digit_rand_val_1.1.1.1,AAAAAAAAAA, SPA packet: 9NCje1d/XtnHYNx0H/By3b09TBgG/iA3Qll3voH5ABboloagCTlIVvzq8QOXjTzFD5OV3I4G5lcjO3zwYLrt55IBflL7WIIOS7vvH9694TP6zW2cK38MMoIFJsWhqNR8wCMWb1qI+kxVJM9s/pJSxRLDkCPkPL0dU
+[+] Invalid_encoding cmd_msg: encoded_non_digit_rand_val_1.1.1.1,AAAAAAAAAA:, SPA packet: 97Yln6TeeIwwNu+79TvGxlKrPT7zm7wFKRnG6rSTouE5h5KOWfuIEnBlizK5t4YqzsPgLo8qjCuriht6bRYVeRgUFud+x+gAafn9+DC9U1tnBb9ARDUpnddRWcgt4cGGE5iT/ymYhLZQCgihRdu6xWRES1i3IONoih7KqHDKVEKx5lal4c8lJu
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_1, SPA packet: /vDlP/EVsqq4V1KTxGuxQWt7G2mWUiMwfFW1TzTIKCstfwx84l+ZPE5MkTaSh8aSavRw1G1FFncB8FxplrWCnVpe1ljugg3yg6a6rpEKzmeDR5ajexXqhbDYshhq+7sWNTZJ0H1DAXQ/S7XX9hnQnDwGc+arF0pzs
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_0, SPA packet: 9DHy+NKttTBkJeoTogArayPGT7oWmy0rfNHHficvbA5Z0857D4gdwsVAr4QIIag+hnTbLO00Al/XPk18qoDW+7ocxvBU5CLNXEaXHpdzcV3FFrw9Dqy+ccK2PJPtp4T7JBhAtMAtgDl/jwMNsKrspDwnahLJC/mtQ
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_5, SPA packet: /tZqIs4zymyahJtSO0SXffltrEP6MH3XvWm2cAm+u4saRjKeIDbgi1gvEGxb8Rf858ldDpfxd3UfOqTFDilJgodYHpi/XLSV8V+yMlvCs5sH5/hEjCm5irOijJu7sVssVFN1eslCHbl0SWWgn47qSj5MFmjlcu/3Q
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_2, SPA packet: (NULL)
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_3, SPA packet: 8udcVC9nwPSqToqmIRnYzZwUxANiJ86TDqawv56iQN4i0cy6RxqPBjgwhVuyvp7oXa9Gfd7r3vYQ058gGXksUuml/P7BZ6KuNfo0bgdTSU5so4Pu7MrRf3BCdErpiGkstD0XFTSYYmIBihgGbn+BRUQAymyik/ZfE
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_4, SPA packet: 8qgjQfKPcXeKiO87ZMG0wqFD/8xTiU1Sun1g5ZaX4amp3p0r3/0tK27sO0S/u4na9oGa7xobRpxP5il0gUsPUGbtLNjrOWf/LAOZdY+4wK79XJVkSxrOLu3GDaQVjwAHzoNGfWKbKHsKA+j5nC19zRxff7refXtgM
+[+] Invalid_encoding msg_type: encoded_non_digit_rand_val_6, SPA packet: +QQHxX9lZnzGj+SrI+Od/oXVQ8vTooZHSlEHSuxwPMFEjiVXNbi/wHrUg9V/urY/W4Cr0eoh0ra6EevTtTK5c7EV3UI7uAKgB9LEML1ZMVJcaPrQJVcvLD60DNJnh2deEdZ6gskGIuOJXZdOqJ58MS7u48YuqWaWQ
diff --git a/test/fuzzing/patches/encoding_non_digit_rand_val.patch b/test/fuzzing/patches/encoding_non_digit_rand_val.patch
new file mode 100644 (file)
index 0000000..0fcb646
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/lib/fko_encode.c b/lib/fko_encode.c
+index c92d421..61e8645 100644
+--- a/lib/fko_encode.c
++++ b/lib/fko_encode.c
+@@ -99,6 +99,8 @@ fko_encode_spa_data(fko_ctx_t ctx)
+     if(tbuf == NULL)
+         return(FKO_ERROR_MEMORY_ALLOCATION);
++    ctx->rand_val[2] = 0x10;
++
+     /* Put it together a piece at a time, starting with the rand val.
+     */
+     strlcpy(tbuf, ctx->rand_val, FKO_ENCODE_TMP_BUF_SIZE);