Skip to content
  • George Karagiannidis's avatar
    Null pointer dereference at ksysguard · c5bc3a6c
    George Karagiannidis authored and David Edmundson's avatar David Edmundson committed
    Summary:
    Attempting to write to a NULL pointer, if the
    ```
    strchr( confLog->name, ':' );
    ```
    has returned null.
    This can happen in case a config file doesn't have the ":" symbol.
    The application crashes this way.
    
    File: `ksysguardd/conf.c`
    
    Test Plan:
    {F6819376} Using this file, and running
    `ksysguardd -d -i -p 1234 -f segfaultrigger.txt` a segmentation fault is generated:
    
    ```
    root@pc:~# ksysguardd -d -i -p 1234 -f segtrig.txt
    ksysguardd 4
    (c) 1999, 2000, 2001, 2002 Chris Schlaeger <cs@kde.org>
    (c) 2001 Tobias Koenig <tokoe@kde.org>
    (c) 2006-2008 Greg Martyn <greg.martyn@gmail.com>
    This program is part of the KDE Project and licensed under
    the GNU GPL version 2. See http://www.kde.org for details.
    Segmentation fault
    ```
    
    Reviewers: davidedmundson
    
    Reviewed By: davidedmundson
    
    Subscribers: davidedmundson, apol, plasma-devel
    
    Tags: #plasma
    
    Differential Revision: https://phabricator.kde.org/D21147
    c5bc3a6c