View Issue Details

IDProjectCategoryView StatusLast Update
0004950unrealircdpublic2017-06-02 07:42
ReporterGottemAssigned Tosyzop 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSDebianOS Version7 (wheezy)
Product Version4.0.11 
Target VersionFixed in Version4.0.12.1 
Summary0004950: Non-existing operclass but allows oper-up anyways
DescriptionOriginally encountered by HeXiLeD: https://forums.unrealircd.org/viewtopic.php?f=52&t=8714

So I dug a bit into it. If you create an oper block using a non-existent operclass, Unreal will let you rehash just fine:
*** Got signal SIGHUP, reloading /home/unreal/ircd/conf/unrealircd.conf file
*** Loading IRCd configuration..
*** Configuration loaded without any problems.

As well as oper up (even though src/operclass.c should return OPER_DENY), but you can't join #opers:
*** oh.i.am.so.amazing is now your displayed host
*** Guest68 sets mode +osHtIqpWT
*** Server notice mask (+kcfFjveGnNqSsoD)
*** Message(520): Cannot join channel #opers (IRCops only)

Now I'm fairly certain it's by design that you don't get a message during rehash/init about missing operclasses. Since the config test hooks don't allow you to reliably check opers/operclasses, you'd have to do it in a later stage (like around MOD_LOAD) and you (Syzop) probably want to keep that sort of stuff out of the core. :> But you should still be denied from opering up entirely.
Steps To ReproduceCreate an oper like this:
oper hotshot {
    class clients;
    operclass sdkjfhgjkhsj;
    mask { *@127.0.0.1; };
    password "whatever";
    require-modes z;
    modes HIipqTtWwxcFfksq;
    vhost oh.i.am.so.amazing;
    swhois "because i am special ";
    snomask cDFfkejvGnNqsSo;
    maxlogins 1;
};
Additional InformationI ran the test without any of my modules loaded. =] I also wrote a module that does the warning about missing operclasses thing since I'm assuming that's by design.
TagsNo tags attached.
3rd party modulesNone

Activities

syzop

2017-05-28 09:45

administrator   ~0019775

I agree, shouldn't permit /OPER up.

syzop

2017-06-02 07:42

administrator   ~0019784

Fixed, thanks for the report :)

[unreal40 072d853] Prevent /OPER for oper blocks with non-existant operclass, as doing so would only be confusing. Reported by Gottem (0004950).

Issue History

Date Modified Username Field Change
2017-05-18 15:56 Gottem New Issue
2017-05-28 09:45 syzop Assigned To => syzop
2017-05-28 09:45 syzop Status new => confirmed
2017-05-28 09:45 syzop Note Added: 0019775
2017-06-02 07:42 syzop Status confirmed => resolved
2017-06-02 07:42 syzop Resolution open => fixed
2017-06-02 07:42 syzop Fixed in Version => 4.0.12.1
2017-06-02 07:42 syzop Note Added: 0019784