1. Sep 29, 2018
    • Rudolf Polzer's avatar
      Fix a potential vulnerability if authproto_pam is setuid root. · acb55c5c
      Rudolf Polzer authored
      There are many different PAM implementations out there, which I haven't
      all tested. The PAM service name is used to build a path name, typically
      inside /etc/pam.d, to find a service configuration file.
      
      There's a possibility that in some PAM implementations, the service name
      is not sanitized and could be used to traverse paths; as most PAM
      clients are _not_ setuid and do _not_ let the caller specify the service
      name (unlike xsecurelock), this alone wouldn't be a vulnerability per se.
      
      And successful path traversal could e.g. lead to attackers obtaining
      information about existence or nonexistence of files they can't see, or
      possibly even reading part of a file (e.g. a PAM implementation might
      spit out syntax error messages quoting parts of a file, either over
      [possibly sniffable] syslog or to stderr; the latter would then allow an
      attacker to run
      
      XSECURELOCK_PAM_SERVICE=../shadow ./authproto_pam
      
      to dump the root password hash.
      
      Again, I'm not aware of any system where this exploit would actually
      work - but as the PAM specs I have here do not describe what happens if
      a PAM service name contains a slash (Linux PAM appears to use the
      basename then), I've decided to just refuse any such names.
      acb55c5c
  2. Sep 27, 2018
  3. Sep 26, 2018
  4. Sep 25, 2018
  5. Sep 18, 2018
  6. Sep 12, 2018
    • Rudolf Polzer's avatar
      Add a simple keyboard layout switcher. · 20cf4320
      Rudolf Polzer authored
      The keybind for it is Ctrl-Tab, which seems to be one of the few that:
      
      - Don't emit a keycode usable in a password.
      - Aren't selectable as Xkb modifier (as that would cause us to swich
        twice, which with 2 layouts would be a NOP).
      - Are available on all layouts and keyboards I know.
      
      Thanks to Soumya S. for an initial implementation of this, which I've
      ported into auth_pam_x11!
      20cf4320
  7. Sep 08, 2018
  8. Aug 25, 2018
    • Rudolf Polzer's avatar
      Rewrite the ~/.xscreensaver parser to match XScreenSaver's exactly. · f05b9152
      Rudolf Polzer authored
      Behavioral changes/fixes:
      
      - Whitespace skipping now is performed in all appropriate places.
      - Visual skipping now happens on the same set of visual names.
      - Quoted arguments in commands now work. In fact, so do all other shell
        characters.
      
      One remaining difference though (intentional):
      
      - The program name itself can't be quoted.
      f05b9152
  9. Aug 24, 2018
    • Rudolf Polzer's avatar
      auth_pam_x11: Show "Processing..." message only if PAM didn't print a text before. · 4c031ff0
      Rudolf Polzer authored
      This serves to handle cases such as PAM asking the user to authenticate
      to an external device by asking the user to do something with
      PAM_TEXT_INFO then waiting for the user to do so; we then want to keep
      PAM's message on the screen until the action happens.
      
      Of course, we still do show the processing message if the last action
      was an entry dialog (e.g. password entry).
      
      Also changes on some systems the events on bad password entry:
      
      - Before: Password:, Processing..., Invalid Password, Processing... (sleeping 2 seconds)
      - After: Password:, Processing..., Invalid Password (sleeping 2 seconds)
      
      This gives users more time to read the error message.
      4c031ff0
  10. Aug 21, 2018
  11. Aug 20, 2018
    • Rudolf Polzer's avatar
      auth_pam_x11: measure the prompt timeout in realtime, not monotonic time. · 6909dc77
      Rudolf Polzer authored
      Yes, this means auth_pam_x11 may instant time out when the clock is
      stepped forward by NTP. Trying this out anyway, as:
      
      - This should only be an issue if the clock is stepped forward by more
        than few minutes, as the timeout defaults to 5 minutes.
      - We also put in a specific counter measure against the clock stepping
        backwards - when it does, we simply reset the timeout.
      
      Advantage: that way, auth_pam_x11 will almost always exit on resuming
      from suspend state. This is very desirable so we can control visibility
      of the hostname in a wrapper script.
      6909dc77
  12. Aug 16, 2018
    • Rudolf Polzer's avatar
      Enable the obscurer window by default. · 193c817e
      Rudolf Polzer authored
      Now that it's 1px smaller from all sides, not only should it not cause
      unredirecting (and thus unmapping of the COW) anymore - even better,
      it's forced to be above everything else, so it can even prevent
      unredirecting in case a full-screen application is running, and thus
      makes sure that the COW stays alive.
      193c817e
  13. Aug 15, 2018
  14. Aug 11, 2018
    • Soumya's avatar
      Default XSECURELOCK_FORCE_GRAB to 0 · 0ffdd044
      Soumya authored
      The option is quite intrusive, and the documentation states "use with care", so I think it makes sense to default it to off.
      0ffdd044
  15. Aug 10, 2018
  16. Aug 09, 2018
  17. Aug 08, 2018