Menu

#1 'Doinkd' segfaults (signal 11) when started as a service.

v1.0_(example)
open
nobody
None
8
2022-06-09
2007-02-05
No

When 'Doinkd' is started as a service and there is no users actualy logged into system it segfaults (signal 11).

There is a bug in the 'chk_maxuser' function. When it receives as a prameter 'user==NULL' following condition:

if (user->mgroup != 0) {

causes segfault. Bug can be very easy reproduced and
tracked by gdb (core dumps have to be enabled).

Tested fix is:

if (user != NULL && user->mgroup != 0) {

Discussion

  • Marcin Sielski

    Marcin Sielski - 2007-02-05
    • priority: 5 --> 8
     
  • Luke Dennis

    Luke Dennis - 2022-06-09

    I think this should instead be

    if (n_users && user->mgroup != 0) {
    

    as user is uninitialised, and therefore not guaranteed to be NULL

     

Log in to post a comment.