View Issue Details

IDProjectCategoryView StatusLast Update
0006447unrealircdpublic2024-09-16 17:17
ReporterCaoS Assigned Tosyzop  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version6.1.7.1 
Fixed in Version6.1.7.2 
Summary0006447: When i Rehash with a Service Bot, UnrealIRCD crash and close
DescriptionHello, i have Installed UnrealIRCD 6.1.7.1 for Windows 11.

I am building service bots with mIRC, that bots have +rsHSiqo and i have configurated PROTOCTL NOQUIT NICKv2 SJOIN SJ3 CLK TKLEXT TKLEXT2 NICKIP ESVID MLOCK EXTSWHOIS SJSBY

The problem is when i use the Rehash command with that services... then the unrealircd show me the error "Unrealircd has encountered a fatal error. Debugging information has been dumped to unrealircd.15472.core and unrealircd.154722.mdmp"

If i use REHASH command like a normal ircop user, it's no problem, but if i use REHASH command with the service, i get the error...

I have tried with UnrealIRCD 6.1.6 and i get the same error... but i have tried with UnrealIRCD 6.1.5 and then it works good...

I don't know what happens, i have used the same Unrealircd configuration for UnrealIRCD 6.1.7.1, for 6.1.6 and for 6.1.5, and the Service Bots are the same all time... but only with UnrealIRCD 6.1.5 it works without problem...

I have asked in #unreal-support and they have tried on 6.1.7.1 LINUX version and it works good...

Could be a windows version error?

I hope you can get the mistake.

Thanks you very much!

CaoS.
Steps To Reproducesockwrite -nt bot rehash

That it's the mIRC command that i use with the service bot.
TagsNo tags attached.
3rd party modules

Activities

syzop

2024-07-31 19:08

administrator   ~0023282

Marked as private now.

Thanks for the report, will look at it when i am back from vacation.

CaoS

2024-08-01 09:35

reporter   ~0023283

Ok i will wait for your answer when you come back, and if you need more information for testing i will give you.

Thanks you and good hollidays

CaoS

2024-08-26 08:35

reporter   ~0023314

Hello another time!

I have download for Windows the new 6.1.7.2 version, but the installer is not correct... for windows is still 6.1.7.1 version, could you update the 6.1.7.2 version installer for Windows?

I have tried another time to Rehash with services and i continue with the same error... i upload you 2 files that i get with the error. There is a third file but it's big to upload here.

Thanks you!

syzop

2024-08-26 18:59

administrator   ~0023318

Last edited: 2024-08-26 19:37

I tried but I cannot reproduce your problem with anope linked to a Windows server and then doing "REHASH". But my config is different and I don't have your self-written IRC bot.

Maybe the .mdmp you attached can give something useful to me, I will look at the end of the week.

As for 6.1.7.2, thanks for the report on that, I am currently recompiling and will publish it in an hour or so. But yeah I don't expect it to fix any issue for you. Update: done, download replaced.

syzop

2024-09-16 16:49

administrator   ~0023354

Last edited: 2024-09-16 17:17

Thanks for your patience. I finally opened the minidumps that you sent to me (already 3 weeks ago) in a debugger on Windows and indeed it is easy to trigger from a trusted server (u-lined or not).

The reason that "REHASH" crashes is that in server-to-server traffic (and your client is linked as a server, not as a user) it is expected to be the format "REHASH name.of.server.to.rehash" (and yes, this is undocumented). With just "REHASH" it reads out-of-bounds and results in reading an invalid pointer and crashes. Now, UnrealIRCd shouldn't crash on such simple invalid server traffic so I have now fixed the REHASH command to send a ERR_NEEDMOREPARAMS message back.

A release is not yet around the corner, but the fix for you is to send "REHASH name.of.server" both before and after this fix, so if you do that, all will be fine!

Commit: https://github.com/unrealircd/unrealircd/commit/7396e6bd77b28ebce44373b79453d308e35c6d23

commit 7396e6bd77b28ebce44373b79453d308e35c6d23 (HEAD -> unreal60_dev)
Author: Bram Matthys <[email protected]>
Date:   Mon Sep 16 16:42:53 2024 +0200

    Fix crash when a server sends an invalid REHASH command.
    (This can only be sent by linked trusted servers)
    
    Reported by CaoS in https://bugs.unrealircd.org/view.php?id=6447


EDIT: set back to "public" but removed the minidump attachments and 1 bugnote with an URL to the crash files since those contain potentially sensitive information

Issue History

Date Modified Username Field Change
2024-07-31 17:53 CaoS New Issue
2024-07-31 19:08 syzop View Status public => private
2024-07-31 19:08 syzop Note Added: 0023282
2024-08-01 09:35 CaoS Note Added: 0023283
2024-08-26 08:35 CaoS Note Added: 0023314
2024-08-26 08:35 CaoS File Added: unrealircd.8884.core
2024-08-26 08:35 CaoS File Added: unrealircd.8884.mdmp
2024-08-26 18:59 syzop Note Added: 0023318
2024-08-26 19:00 syzop Severity feature => crash
2024-08-26 19:37 syzop Note Edited: 0023318
2024-09-16 16:43 syzop File Deleted: unrealircd.8884.core
2024-09-16 16:43 syzop File Deleted: unrealircd.8884.mdmp
2024-09-16 16:49 syzop Assigned To => syzop
2024-09-16 16:49 syzop Status new => resolved
2024-09-16 16:49 syzop Resolution open => fixed
2024-09-16 16:49 syzop Fixed in Version => 6.1.7.2
2024-09-16 16:49 syzop Note Added: 0023354
2024-09-16 16:49 syzop View Status private => public
2024-09-16 16:50 syzop Note Edited: 0023354
2024-09-16 16:50 syzop Note Edited: 0023354
2024-09-16 16:51 syzop Note Edited: 0023354
2024-09-16 16:51 syzop Note Edited: 0023354
2024-09-16 17:17 syzop Note Edited: 0023354