View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005643 | unreal | module api | public | 2020-04-21 11:51 | 2020-06-27 13:09 |
Reporter | k4be | Assigned To | syzop | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 5.0.4 | ||||
Summary | 0005643: Moddata serialize function is called for modules that failed to load | ||||
Description | A module can request request client moddata with sync enabled and provided serialize and unserialize functions inside the MOD_INIT call. If the later MOD_LOAD fails, the moddata remains registered, resulting in a crash during server linking when unavailable code for serialize function is called. | ||||
Steps To Reproduce | This code should cause the problem: char *test_serialize(ModData *m){ return NULL; } void test_unserialize(char *str, ModData *m){ return; } void test_free(ModData *m){ return; } MOD_INIT(){ ModDataInfo mreq; memset(&mreq, 0, sizeof(mreq)); mreq.type = MODDATATYPE_CLIENT; mreq.name = "test"; mreq.sync = 1; mreq.free = test_free; mreq.serialize = test_serialize; mreq.unserialize = test_unserialize; ModDataAdd(modinfo->handle, mreq); return MOD_SUCCESS; } MOD_LOAD(){ return MOD_FAILED; } | ||||
Tags | No tags attached. | ||||
3rd party modules | |||||
|
Crash also occurs if you return MOD_FAILED from MOD_INIT after moddata registration. I will look into it. |
|
Not sure if I will be able to fix this soon. k4be: would it be possible for you to change the geoip-base module for now, to check the file existence checks to config_posttest? So rather than failing in MOD_LOAD, fail in config posttest instead. The reason I ask is that pretty much nobody is hitting this bug EXCEPT for users who are using geoip-base, about one user every 2 weeks, which is a bit of a shame. Otherwise you (and those poor users) will have to wait until I fix the general problem, but that might not even be this year. Fixing these type of bugs can easily introduce more bugs and I would like to keep things stable :) |
|
I have updated the module. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-21 11:51 | k4be | New Issue | |
2020-04-24 19:48 | syzop | Note Added: 0021524 | |
2020-04-24 19:49 | syzop | Assigned To | => syzop |
2020-04-24 19:49 | syzop | Status | new => confirmed |
2020-05-05 08:53 | syzop | Severity | minor => crash |
2020-06-26 17:01 | syzop | Note Added: 0021651 | |
2020-06-27 13:09 | k4be | Note Added: 0021652 |