IOsipov / adns-python

Automatically exported from code.google.com/p/adns-python
1 stars 0 forks source link

use after free? #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Try this in a python console:

>>> import adns
>>> c=adns.init()
>>> c.submit('www.google.com',adns.rr.A)  # note we're losing the reference
<ADNS_Query object at 0xb784e2c0>
>>> c.allqueries()
[<ADNS_Query object at 0xb784e2c0>]
>>> c.completed(0)
[]
>>> c.allqueries()  # now we'll see the bug
['<stdin>']

In my tests I usually see the string "stdin" for some reason, but after messing 
around a bit I get it to show arbitrary data, and/or crash the process with a 
segmentation fault. Apparently an object was freed before all references to it 
were removed.

I'm using Ubuntu 10.4 32 bits, using the python-adns package.

Original issue reported on code.google.com by mvi...@gmail.com on 24 Jun 2011 at 3:49

GoogleCodeExporter commented 9 years ago
I cannot reproduce it with the latest version (installed with easy_install) so 
I assume this was either fixed already, or it's harder to trigger the bug due 
to other changes.

Original comment by mvi...@gmail.com on 24 Jun 2011 at 3:58