greenbone / gvmd

Greenbone Vulnerability Manager - The database backend for the Greenbone Community Edition
GNU Affero General Public License v3.0
281 stars 153 forks source link

Bad xml in nvts? #73

Closed asmaack closed 6 years ago

asmaack commented 6 years ago

Hi,

Not sure if this should be reported here, but when querying nvt data over socket with tools gvm-cli and gvm-pyshell, I get errors which I suspect are caused by bad xml in nvt data. Am I right, or is there something missing in my environment?

NB this only happens when querying some nvts from some of the IT-Grundschutz-* families.

$ gvm-cli socket -c --xml "<get_nvts nvt_oid=\"1.3.6.1.4.1.25623.1.0.94018\" details=\"1\" />"
'utf-8' codec can't decode byte 0xc3 in position 1023: unexpected end of data

And inside the gvm-pyshell, I get:

$ gvm-pyshell socket -c -i
badnvt = gmp.get_nvts(nvt_oid="1.3.6.1.4.1.25623.1.0.94018", details="1")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/gmp/gvm_connection.py", line 525, in get_nvts
    return self.read()
  File "/usr/local/lib/python3.5/dist-packages/gmp/gvm_connection.py", line 99, in read
    self.checkCommandStatus(response)
  File "/usr/local/lib/python3.5/dist-packages/gmp/gvm_connection.py", line 136, in checkCommandStatus
    status = root.attrib['status']
AttributeError: 'NoneType' object has no attribute 'attrib'

/usr/local/var/log/gvm/gvmd.log: md main:WARNING:2018-04-15 13h24.00 UTC:10287: read_from_client_unix: failed to read from client: Connection reset by peer

$ gvm-cli --version
gvm-cli 1.3.1

$ gvm-pyshell --version
gvm-pyshell 1.3.1

$ gvmd --version
Greenbone Vulnerability Manager 7.1+beta1
Manager DB revision 190

$ openvassd --version
OpenVAS Scanner 5.2+beta1

$ python3 --version
Python 3.5.2
bjoernricks commented 6 years ago

Could you please report both issues to https://github.com/greenbone/gvm-tools? Both issues should be bugs in gvm-tools.

bjoernricks commented 6 years ago

Just added the issue to https://github.com/greenbone/gvm-tools/issues/16