Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KDE Connect KDE Connect
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Bugzilla
    • Bugzilla
  • Merge requests 30
    • Merge requests 30
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Network
  • KDE ConnectKDE Connect
  • Merge requests
  • !425

Use device ID from client SSL certificate, not UDP packet

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Vladimir Panteleev requested to merge vpanteleev/kdeconnect-kde:pull-20210925-125139 into master Sep 25, 2021
  • Overview 1
  • Commits 1
  • Pipelines 1
  • Changes 1

Consider the following scenario:

  1. We send a UDP broadcast
  2. We receive a reply from 192.168.0.1 with device ID "foo"
  3. We connect to 192.168.0.1, and find that the device's certificate is actually for a different ID "bar". This could be because the packet did not actually originate from 192.168.0.1, or this host is malicious / malfunctioning.
  4. We remember that device ID "foo" has certificate with common name "bar".
  5. When we finally attempt to connect to the real device ID "foo", we reject their certificate (common name "foo"). We can now never successfully connect to "foo".

On some network (mis-)configurations, this completely prevents kdeconnectd from connecting to any peers, because a reply which is seen as originating from the local interface address will cause kdeconnectd to immediately connect to itself and remember its own certificate.

Address this by using the certificate display name of the peer, which will match the real device ID.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: pull-20210925-125139