View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002694 | unreal | ircd | public | 2005-11-15 23:42 | 2006-11-04 11:26 |
| Reporter | w00t | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | no change required | ||
| Product Version | 3.2.3 | ||||
| Summary | 0002694: del_Command on a non-existant command causes a crash | ||||
| Description | Sure, it's a fairly stupid thing to do - perhaps it should be checked for though? (I was converting some stuff from add_Command to CommandAdd, and forgot about removing del_Command ;p) | ||||
| 3rd party modules | |||||
|
|
Could you paste some code snippits what you mean by this? |
|
|
Oh and, ideally, a backtrace of course ;). Yes I'm lazy. |
|
|
Sure, I'll grab one tonight - it was on windows, so I'll try duplicate on Linux. The crash happened while trying to free a token, from memory - but the whole thing was one nice big bed of wild pointers. |
|
|
Thanks, that would help :) Because I just quickly tried to reproduce it and got no crash ;p. Alternatively, you can send me something (or upload) that always causes this crash. |
|
|
Oh ok nevermind, that was a perm mod ;p. VALGRIND TRACE: ==25211== Invalid read of size 4 ==25211== at 0x80997DE: CommandDel (api-command.c:103) ==25211== by 0x8068783: Unload_all_loaded_modules (modules.c:532) ==25211== by 0x806F401: init_conf (s_conf.c:1627) ==25211== by 0x8081492: rehash_internal (s_conf.c:8710) ==25211== by 0x808144E: rehash (s_conf.c:8694) ==25211== by 0x8086B6D: m_rehash (s_serv.c:724) ==25211== by 0x806C23F: parse (parse.c:450) ==25211== by 0x806AD1E: dopacket (packet.c:138) ==25211== by 0x8057014: read_packet (s_bsd.c:1506) ==25211== by 0x8057C17: read_message (s_bsd.c:1964) ==25211== by 0x8065AEC: main (ircd.c:1540) ==25211== Address 0x1BAFD7B0 is 16 bytes inside a block of size 56 free'd ==25211== at 0x1B904B04: free (vg_replace_malloc.c:152) ==25211== by 0x806B36A: del_Command (packet.c:345) ==25211== by 0x1B90FF34: Mod_Unload (m_jumpserver.c:109) ==25211== by 0x80686E7: Unload_all_loaded_modules (modules.c:514) ==25211== by 0x806F401: init_conf (s_conf.c:1627) ==25211== by 0x8081492: rehash_internal (s_conf.c:8710) ==25211== by 0x808144E: rehash (s_conf.c:8694) ==25211== by 0x8086B6D: m_rehash (s_serv.c:724) ==25211== by 0x806C23F: parse (parse.c:450) ==25211== by 0x806AD1E: dopacket (packet.c:138) ==25211== by 0x8057014: read_packet (s_bsd.c:1506) ==25211== by 0x8057C17: read_message (s_bsd.c:1964) ==25211== For later, because now I'm going to do some WORK, lol ;) |
|
|
On a sidenote, perhaps we should not support this in the first place, because module coders should all use CommandAdd(). As mentioned before (I think?) del_Command should not be used, because it's actually meant for non-modules stuff (it does not add a module handle). |
|
|
Yeah, I kind of wondered why it was available to mods ;p. The same of course applies to all the HookAdd, HookAddEx, etc stuff - really confusing :p |
|
|
I think we can do without fixing this ;P |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-11-15 23:42 | w00t | New Issue | |
| 2005-11-16 21:11 | syzop | Note Added: 0010755 | |
| 2005-11-16 21:12 | syzop | Note Added: 0010756 | |
| 2005-11-16 22:50 | w00t | Note Added: 0010757 | |
| 2005-11-17 10:11 | syzop | Note Added: 0010766 | |
| 2005-11-17 10:12 | syzop | Note Added: 0010767 | |
| 2005-11-17 10:14 | syzop | Note Added: 0010768 | |
| 2005-11-18 03:14 | w00t | Note Added: 0010769 | |
| 2006-11-04 11:26 | syzop | Status | new => closed |
| 2006-11-04 11:26 | syzop | Note Added: 0012579 | |
| 2006-11-04 11:26 | syzop | Resolution | open => no change required |