Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  


Pages: [1]   Go Down

Author Topic: os_jail causing anope 1.8.5 to crash  (Read 5826 times)

0 Members and 1 Guest are viewing this topic.


  • Anope User
  • Offline Offline
  • Posts: 86
os_jail causing anope 1.8.5 to crash
« on: June 24, 2014, 09:48:19 PM »

05<09:42pm> -OperServ- Module os_jail loaded
<09:42pm> <Global> Module loading status: 0 (Module, Okay - No Error)
04<09:42pm> <Global> OperServ: Cheiron: help jail
05<09:42pm> -OperServ- Syntax: JAIL nick
05<09:42pm> -OperServ- 
05<09:42pm> -OperServ- The JAIL command is used to jail a user.
05<09:42pm> -OperServ- This will force the user to part all channels
05<09:42pm> -OperServ- and force them to join #jail.
05<09:42pm> -OperServ- 
05<09:42pm> -OperServ- Restricted to IRC Operators
04<09:43pm> <Global> OperServ: Cheiron: jail auto_help
04<09:43pm> <Global> PANIC! buffer = :Cheiron PRIVMSG :jail auto_help
<09:43pm> <Global> Backtrace: Segmentation fault detected
<09:43pm> <Global> Backtrace: report the following lines
<09:43pm> <Global> Backtrace: Anope version 1.8.5 (3037) build #1, compiled May 24 2011 12:50:19  M
<09:43pm> <Global> Backtrace(0): ./services(do_backtrace+0x3b) [0x42f9cb]
<09:43pm> <Global> Backtrace(1): ./services(sighandler+0x154) [0x430534]
<09:43pm> <Global> Backtrace(2): /lib/ [0x7f23c84bd230]
<09:43pm> <Global> Backtrace(3): /home/anope/services/modules/runtime/ [0x7f23b7d34559]
<09:43pm> <Global> Backtrace(4): ./services(do_run_cmd+0xa8) [0x424088]
<09:43pm> <Global> Backtrace(5): ./services(m_privmsg+0x1f5) [0x4322d5]
<09:43pm> <Global> Backtrace(6): /home/anope/services/modules/runtime/ [0x7f23c82846c4]
<09:43pm> <Global> Backtrace(7): ./services(process+0x1a7) [0x441827]
<09:43pm> <Global> Backtrace(8): ./services(main+0x1ad) [0x4300cd]
<09:43pm> <Global> Backtrace(9): /lib/ [0x7f23c84a9c8d]
<09:43pm> <Global> Backtrace: complete
<09:43pm> <Global> Shutdown: Services Shutting Down
<09:43pm> <Global> Services terminating: Segmentation fault


  • Anope User
  • Offline Offline
  • Posts: 86
Re: os_jail causing anope 1.8.5 to crash
« Reply #1 on: July 06, 2014, 10:36:46 PM »

gonna bump this if it is ok...

Jens Voss

  • Team
  • *
  • Offline Offline
  • Posts: 125
Re: os_jail causing anope 1.8.5 to crash
« Reply #2 on: July 07, 2014, 08:05:48 AM »

yes, thats a bug in the module code. the pointer "na" is not initialized, its pointing to a random location in the memory. this causes your crash.
easy solution: remove the marked lines, compile again.
better solution: contact the module author.

int do_userjail(User *u)
   User *u2;
   NickAlias *na;
   char *buf = moduleGetLastBuffer();
   char *nick = myStrGetToken(buf, ' ', 0);
   char *vHost;
   char *vIdent = NULL;
   if (!nick) {
      notice(s_OperServ, u->nick, "Syntax: \2JAIL \037nick\037\2");
   } else if (nickIsServices(nick, 1)) {
      notice(s_OperServ, u->nick, "Nick \2%s\2 is part of this Network Services!", nick);
   } else if (!(u2 = finduser(nick))) {
      notice_lang(s_OperServ, u, NICK_X_NOT_IN_USE, nick);
   } else if (na->status & NS_VERBOTEN) {
      notice_lang(s_OperServ, u, NICK_X_FORBIDDEN, na->nick);
   } else {
                anope_cmd_svsjoin(s_OperServ, nick, "#1,0", NULL);
                anope_cmd_svsjoin(s_OperServ, nick, J_CHANNEL, NULL);
                anope_cmd_svsjoin(s_OperServ, u->nick, J_CHANNEL, NULL);
      if (WallOSGlobal)
              anope_cmd_global(s_OperServ, JAIL_OP_NOTICE,
                         u->nick, nick);

Pages: [1]   Go Up