Bug 1720269 - osin: side channel timing attack against endpoint secrets
Summary: osin: side channel timing attack against endpoint secrets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: apiserver-auth
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.5.0
Assignee: Standa Laznicka
QA Contact: pmali
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-13 14:25 UTC by Dave Baker
Modified: 2020-07-13 17:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:11:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oauth-server pull 45 0 None closed Bug 1720269: make client secret comparisons in constant time 2020-09-09 04:56:25 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:11:19 UTC

Description Dave Baker 2019-06-13 14:25:23 UTC
Description of problem:

osin compares secrets for endpoints secured by client secret auth with native string comparison.  This is done in linear time, which opens the possibility of a side-channel timing attack.


Version-Release number of selected component (if applicable):

Present in current master branch of "osin"

https://github.com/openshift/osin


How reproducible:

This is believed to be a hardening bug, not a vulnerability.

We do not have current information on the reliability of attacking via this timing side-channel.



Steps to Reproduce:
1. https://en.wikipedia.org/wiki/Timing_attack
2.
3.

Actual results:



Expected results:

String comparisons should take constant time.



Additional info:

Native string comparison is here:
- https://github.com/openshift/osin/blob/master/util.go#L31

Golang crypto library offers this as an alternative:
- https://golang.org/pkg/crypto/subtle/#ConstantTimeCompare

Comment 11 errata-xmlrpc 2020-07-13 17:11:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2409


Note You need to log in before you can comment on or make changes to this bug.