[Differential] [Request, 4 lines] D1533: guard access to unsafe config pointer

sebas (Sebastian Kügler) noreply at phabricator.kde.org
Wed May 4 02:34:03 UTC 2016


sebas created this revision.
sebas added a reviewer: Plasma.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  This fixes a crashing race condition in the kscreen kded module when
  the config cannot be deserialized from the filesystem. In this case,
  Serializer returns a nullptr which is then derefenced without
  validation.
  
  In practice, we just can't be sure the file can be read, so we need to
  make sure that we're not passing configs around which may be empty.
  
  Down the road, I think we should be a bit more careful also in
  libkscreen, there's some API that can receive ConfigPtrs, which aren't
  validated before dereferencing.
  
  BUG:362586
  FIXED-IN:5.6.4
  CHANGELOG:Fix crasher in kscreen kded daemon

TEST PLAN
  Can't really test this scenario, since I can't reproduce the crash. All 
  testing I've done passes, and I've added a bunch of autotests for invalid 
  configs (separate commit)

REPOSITORY
  rKSCREEN KScreen

BRANCH
  sebas/362586

REVISION DETAIL
  https://phabricator.kde.org/D1533

AFFECTED FILES
  kded/daemon.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: sebas, Plasma
Cc: plasma-devel, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160504/bf9a8a5a/attachment-0001.html>


More information about the Plasma-devel mailing list