Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Mitigate timing oracle using dummy hash cache#1116

Open
stenslae wants to merge 1 commit into
wolfSSL:masterwolfSSL/wolfssh:masterfrom
stenslae:pr-timing-oraclestenslae/wolfssh:pr-timing-oracleCopy head branch name to clipboard
Open

Mitigate timing oracle using dummy hash cache#1116
stenslae wants to merge 1 commit into
wolfSSL:masterwolfSSL/wolfssh:masterfrom
stenslae:pr-timing-oraclestenslae/wolfssh:pr-timing-oracleCopy head branch name to clipboard

Conversation

@stenslae

@stenslae stenslae commented Jul 21, 2026

Copy link
Copy Markdown
Member

Does a fake crypt() operation when an authentication attempt is rejected early and caches hash type at SSHD startup. CI testing is added for this change.

@stenslae stenslae self-assigned this Jul 21, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1116

Scan targets checked: wolfssh-bugs, wolfssh-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread apps/wolfsshd/auth.h
Comment thread apps/wolfsshd/auth.h

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1116

Scan targets checked: wolfssh-bugs, wolfssh-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread apps/wolfsshd/auth.c
Comment thread apps/wolfsshd/auth.c
@stenslae
stenslae requested review from wolfSSL-Fenrir-bot and removed request for wolfSSL-Fenrir-bot July 23, 2026 17:11

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #1116

Scan targets checked: wolfssh-bugs, wolfssh-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread apps/wolfsshd/auth.c

/* Fake crypt() on early rejections to equalize timing.
* Minor syscall timing gap remains; closing it requires unsafe privilege escalation. */
if (ret != WOLFSSH_USERAUTH_SUCCESS) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 [Low] DoFakePasswordCheck inverts timing oracle for public-key auth · Constant-time violations

DoFakePasswordCheck is called for ALL DoCheckUser rejections regardless of auth type, so unknown-user public-key attempts pay a full SHA-512 crypt() cost (~100 ms with rounds=5000) while known-user-wrong-key attempts pay none, creating a consistent timing oracle for pubkey-based user enumeration.

Fix: Guard the DoFakePasswordCheck call on DoCheckUser failure to only run when authData->type == WOLFSSH_USERAUTH_PASSWORD, avoiding the asymmetric overhead on non-password auth paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.