get errors out on malformed HTTP response

Bug #701900 reported by Dominic White
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Fix Released
Low
marcog

Bug Description

The get command will cause the following Traceback on a malformed HTTP response:

ERROR core.dispatcher: Exception occured in HTTP processor of network plugin.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Ibid-0.1.0-py2.6.egg/ibid/core.py", line 32, in _process
    processor.process(event)
  File "/usr/local/lib/python2.6/dist-packages/Ibid-0.1.0-py2.6.egg/ibid/plugins/__init__.py", line 144, in process
    method(event, *match.groups())
  File "/usr/local/lib/python2.6/dist-packages/Ibid-0.1.0-py2.6.egg/ibid/plugins/network.py", line 275, in get
    if (content_type.startswith('text/html') or
AttributeError: 'NoneType' object has no attribute 'startswith'

To reproduce:

Run netcat on a public server:
    $ nc -l 5000

Instruct the bot to fetch the page:
    bot: get xxx.xxx.xxx:5000

You'll see the following come through in the nc session:

    GET http://xxx.xxx.xxx:5000/ HTTP/1.1
    Host: xxx.xxx.xx:5000
    Accept-Encoding: identity
    Range: bytes=0-2048

Respond with the following (without indents):

    HTTP/1.1 502 Foo Bar

    ^C

It's potentially a vulnerability, but I haven't checked further. It also looks like it's an error in an included lib rather than ibid itself.

Related branches

Revision history for this message
Dominic White (singe-lauchpad) wrote :

BTW this was on 0.1 as of 12 Jan 2010.

marcog (marco-gallotta)
Changed in ibid:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → marcog (marco-gallotta)
milestone: none → 0.1.1
marcog (marco-gallotta)
Changed in ibid:
status: In Progress → Fix Committed
Changed in ibid:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.