Nmap Development mailing list archives

Re: Follow up to NSE issues and gh_list assert() failure (Was 4.85BETA2 posted...)


From: Patrick Donnelly <batrick.donnelly () gmail com>
Date: Wed, 25 Feb 2009 21:12:10 -0700

On Wed, Feb 25, 2009 at 6:28 PM, Brandon Enright <bmenrigh () ucsd edu> wrote:
==12614==
==12614== Invalid read of size 8
==12614==    at 0x58427C3: lua_pushboolean (in /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x46B523: l_nsock_checkstatus(lua_State*, void*) (nse_nsock.cc:412)
==12614==    by 0x46F02D: l_nsock_receive_handler(void*, void*, void*) (nse_nsock.cc:605)
==12614==    by 0x47BBA9: msevent_dispatch_and_delete (nsock_event.c:297)
==12614==    by 0x47A0BC: nsock_loop (nsock_core.c:913)
==12614==    by 0x468FBB: process_mainloop(lua_State*) (nse_main.cc:465)
==12614==    by 0x469DE7: script_scan(std::vector<Target*, std::allocator<Target*> >&) (nse_main.cc:368)
==12614==    by 0x41DA73: nmap_main(int, char**) (nmap.cc:1822)
==12614==    by 0x4197D6: main (main.cc:224)
==12614==  Address 0xa5ab3c8 is 16 bytes inside a block of size 184 free'd
==12614==    at 0x4C20A6A: free (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==12614==    by 0x5850634: (within /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x584973B: (within /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x5847ECB: (within /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x58480F2: (within /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x58484C2: (within /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x5842CA7: lua_gc (in /usr/lib64/liblua.so.5.1.3)
==12614==    by 0x4691C5: process_mainloop(lua_State*) (nse_main.cc:500)
==12614==    by 0x469DE7: script_scan(std::vector<Target*, std::allocator<Target*> >&) (nse_main.cc:368)
==12614==    by 0x41DA73: nmap_main(int, char**) (nmap.cc:1822)
==12614==    by 0x4197D6: main (main.cc:224)

I'm fairly certain this is caused by nsock using the Lua thread after
we have killed it (most likely due to timeout). Is there a way to stop
nsock from doing work on behalf of the thread once we decide to
destroy the thread?

Cheers,

-- 
-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: