View Issue Details

IDProjectCategoryView StatusLast Update
0005412unrealircdpublic2019-10-27 10:13
Reporterwestor Assigned Tosyzop  
PriorityurgentSeveritycrashReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version5.0.0-alpha2 
Fixed in Version5.0.0-beta1 
Summary0005412: Unloading chanmode modules crashes the server
DescriptionHello,

I tried to disable some modules directly from "modules.conf" and then /rehash but the server stops responding (NOT CRASHED) and i got some debugs in console, i will provide you these informations and the steps:

Modules Unloaded:

chanmodes/nocolor - chanmodes/link - chanmodes/noknock - chanmodes/noinvite - chanmodes/nonotice - chanmodes/nokick - usermodes/privdeaf - snomasks/dccreject - ident_lookup

Console Debug: https://pastebin.com/tmzXYWCx
IRC Debug: https://pastebin.com/H3Kdw6Vc

- Thanks!
Additional Information==29631==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55fcbad53a12 bp 0x7ffec2bdb8d0 sp 0x7ffec2bdb7e0 T0)
==29631==The signal is caused by a READ memory access.
==29631==Hint: address points to the zero page.
    #0 0x55fcbad53a11 in ircvsnprintf /home/westor/unrealircd_5_source/unrealircd/src/ircsprintf.c:54
    #1 0x55fcbadbcba8 in vsendto_prefix_one /home/westor/unrealircd_5_source/unrealircd/src/send.c:898
    #2 0x55fcbadbd20f in sendto_channel /home/westor/unrealircd_5_source/unrealircd/src/send.c:398
    #3 0x55fcbadc9a8c in unload_extcmode_commit /home/westor/unrealircd_5_source/unrealircd/src/api-channelmode.c:311
    #4 0x55fcbadca59c in CmodeDel /home/westor/unrealircd_5_source/unrealircd/src/api-channelmode.c:354
    #5 0x55fcbad5cb25 in FreeModObj /home/westor/unrealircd_5_source/unrealircd/src/modules.c:526
    #6 0x55fcbad5d2df in Module_free /home/westor/unrealircd_5_source/unrealircd/src/modules.c:654
    #7 0x55fcbad5e016 in Module_Unload /home/westor/unrealircd_5_source/unrealircd/src/modules.c:717
    0000008 0x55fcbad5e0b3 in e_unload_module_delayed /home/westor/unrealircd_5_source/unrealircd/src/modules.c:1172
    #9 0x55fcbadd554d in DoEvents /home/westor/unrealircd_5_source/unrealircd/src/api-event.c:145
    #10 0x55fcbad53525 in main /home/westor/unrealircd_5_source/unrealircd/src/ircd.c:1358
    #11 0x7f90f83b6b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    #12 0x55fcbad348b9 in _start (/home/westor/unrealircd_5/bin/unrealircd+0x558b9)
TagsNo tags attached.
Attached Files
3rd party modulesnone

Activities

westor

2019-09-18 12:37

reporter   ~0020898

When i tried to start again the server the console gave me 2 warnings:

[warning] [tkldb] Unhandled type!! TKLDB is missing support for type 132 -- STOPPED reading db entries!
[warning] [tkldb] Database invalid. Extra data found at end of DB file.

westor

2019-09-18 12:40

reporter   ~0020899

I will provide you the "tkl.db" just in case that will help more.
tkl.db (125,881 bytes)

syzop

2019-09-21 15:35

administrator   ~0020908

Thanks, shouldn't crash indeed.

syzop

2019-09-21 15:37

administrator   ~0020912

tkldb issue split off to https://bugs.unrealircd.org/view.php?id=5418

syzop

2019-09-21 15:42

administrator   ~0020913

I'll see if I can have a look at this today for alpha3, otherwise I'll do it post-alpha3 though.

syzop

2019-10-27 10:13

administrator   ~0021063

Fixed, thanks for the report!

commit 72d71e30ce95860eed314e2835b97850e35182d5
Author: Bram Matthys <[email protected]>
Date: Sun Oct 27 09:07:43 2019 +0100

    Fix unloading of chanmode modules crashing the server. Reported by westor
    in https://bugs.unrealircd.org/view.php?id=5412

Issue History

Date Modified Username Field Change
2019-09-18 12:34 westor New Issue
2019-09-18 12:37 westor Note Added: 0020898
2019-09-18 12:40 westor File Added: tkl.db
2019-09-18 12:40 westor Note Added: 0020899
2019-09-21 15:35 syzop Status new => acknowledged
2019-09-21 15:35 syzop Summary Server stops responding and disconnected after disabling some modules => Unloading chanmode modules crashes the server
2019-09-21 15:35 syzop Note Added: 0020908
2019-09-21 15:37 syzop Issue cloned: 0005418
2019-09-21 15:37 syzop Note Added: 0020912
2019-09-21 15:38 syzop Additional Information Updated
2019-09-21 15:42 syzop Note Added: 0020913
2019-10-27 10:13 syzop Assigned To => syzop
2019-10-27 10:13 syzop Status acknowledged => resolved
2019-10-27 10:13 syzop Resolution open => fixed
2019-10-27 10:13 syzop Fixed in Version => 5.0.0-beta1
2019-10-27 10:13 syzop Note Added: 0021063