|
|
|
@ -94,6 +94,10 @@ int main(int argc, char **argv) { |
|
|
|
|
"\x00\x00\x04\x01\x24\x00\x00\x00\x01" |
|
|
|
|
"\x00\x00\x00\x00", |
|
|
|
|
0); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x05\x01\x24\x00\x00\x00\x01" |
|
|
|
|
"", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x05\x01\x24\x00\x00\x00\x01" |
|
|
|
|
"\x00", |
|
|
|
@ -171,10 +175,52 @@ int main(int argc, char **argv) { |
|
|
|
|
"\x00\x00\x07\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80\x80\x00", |
|
|
|
|
0); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80\x80", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80\x80\x80", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80\x80\x80\x00", |
|
|
|
|
0); |
|
|
|
|
/* overflow on byte 4 */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x06\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80\x7f", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x06\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\xff\xff\xff\xff\x0f", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
/* overflow after byte 4 */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x08\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\xff\x80\x80\x80\x80\x80\x80\x02", |
|
|
|
|
0); |
|
|
|
|
/* end of headers mid-opcode */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x01\x01\x04\x00\x00\x00\x01" |
|
|
|
@ -187,11 +233,22 @@ int main(int argc, char **argv) { |
|
|
|
|
"\x00\x00\x03\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\x3f\xe1\x1f", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
/* dynamic table size update: set too large */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, |
|
|
|
|
PFX_STR
|
|
|
|
|
"\x00\x00\x03\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\x3f\xf1\x1f", |
|
|
|
|
0); |
|
|
|
|
/* dynamic table size update: set twice */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x04\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\x20\x3f\xe1\x1f", |
|
|
|
|
GRPC_BAD_CLIENT_DISCONNECT); |
|
|
|
|
/* dynamic table size update: set thrice */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR |
|
|
|
|
"\x00\x00\x03\x01\x04\x00\x00\x00\x01" |
|
|
|
|
"\x20\x20\x20", |
|
|
|
|
0); |
|
|
|
|
|
|
|
|
|
/* non-ending header followed by continuation frame */ |
|
|
|
|
GRPC_RUN_BAD_CLIENT_TEST(verifier, |
|
|
|
|