Browse Source

nfqws,tpws: fix tls protocol bounds check

pull/172/head
bol-van 2 years ago
parent
commit
c4729c3006
  1. BIN
      binaries/aarch64/nfqws
  2. BIN
      binaries/aarch64/tpws
  3. BIN
      binaries/arm/nfqws
  4. BIN
      binaries/arm/tpws
  5. BIN
      binaries/freebsd-x64/dvtws
  6. BIN
      binaries/freebsd-x64/tpws
  7. BIN
      binaries/mac64/tpws
  8. BIN
      binaries/mips32r1-lsb/nfqws
  9. BIN
      binaries/mips32r1-lsb/tpws
  10. BIN
      binaries/mips32r1-msb/nfqws
  11. BIN
      binaries/mips32r1-msb/tpws
  12. BIN
      binaries/mips64r2-msb/nfqws
  13. BIN
      binaries/mips64r2-msb/tpws
  14. BIN
      binaries/ppc/nfqws
  15. BIN
      binaries/ppc/tpws
  16. BIN
      binaries/x86/nfqws
  17. BIN
      binaries/x86/tpws
  18. BIN
      binaries/x86_64/nfqws
  19. BIN
      binaries/x86_64/tpws
  20. BIN
      binaries/x86_64/tpws_wsl.tgz
  21. 2
      nfq/protocol.c
  22. 4
      tpws/protocol.c

BIN
binaries/aarch64/nfqws

Binary file not shown.

BIN
binaries/aarch64/tpws

Binary file not shown.

BIN
binaries/arm/nfqws

Binary file not shown.

BIN
binaries/arm/tpws

Binary file not shown.

BIN
binaries/freebsd-x64/dvtws

Binary file not shown.

BIN
binaries/freebsd-x64/tpws

Binary file not shown.

BIN
binaries/mac64/tpws

Binary file not shown.

BIN
binaries/mips32r1-lsb/nfqws

Binary file not shown.

BIN
binaries/mips32r1-lsb/tpws

Binary file not shown.

BIN
binaries/mips32r1-msb/nfqws

Binary file not shown.

BIN
binaries/mips32r1-msb/tpws

Binary file not shown.

BIN
binaries/mips64r2-msb/nfqws

Binary file not shown.

BIN
binaries/mips64r2-msb/tpws

Binary file not shown.

BIN
binaries/ppc/nfqws

Binary file not shown.

BIN
binaries/ppc/tpws

Binary file not shown.

BIN
binaries/x86/nfqws

Binary file not shown.

BIN
binaries/x86/tpws

Binary file not shown.

BIN
binaries/x86_64/nfqws

Binary file not shown.

BIN
binaries/x86_64/tpws

Binary file not shown.

BIN
binaries/x86_64/tpws_wsl.tgz

Binary file not shown.

2
nfq/protocol.c

@ -122,7 +122,7 @@ bool TLSFindExtInHandshake(const uint8_t *data, size_t len, uint16_t type, const
data += l; len -= l;
l = pntoh16(data);
data += 2; len -= 2;
if (l < len) return false;
if (len < l) return false;
while (l >= 4)
{

4
tpws/protocol.c

@ -6,6 +6,8 @@
#include <ctype.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdio.h>
const char *http_methods[] = { "GET /","POST /","HEAD /","OPTIONS /","PUT /","DELETE /","CONNECT /","TRACE /",NULL };
bool IsHttp(const uint8_t *data, size_t len)
@ -86,7 +88,7 @@ bool TLSFindExt(const uint8_t *data, size_t len, uint16_t type, const uint8_t **
data+=l; len-=l;
l=pntoh16(data);
data+=2; len-=2;
if (l<len) return false;
if (len<l) return false;
while(l>=4)
{

Loading…
Cancel
Save