sstp-client: Could not create password hash

Open Beginner friendly
#31,407 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

Start with the sstp-client package Makefile and its DEPENDS line, which currently lists +libopenssl but not +libopenssl-legacy. Confirm that the NT hash (MD4) failure in the log comes from the missing legacy OpenSSL provider, and check whether the maintainer agrees with the proposed dependency or wants documentation instead. Done means a dependency change or doc note that a clean image with sstp-client can establish an MS-CHAPv2 SSTP tunnel.

Written by the indexing model from the issue text.

Description

bug
Package Name

sstp-client

Maintainer

@Federico Di Marco

OpenWrt Version

25.12.6

OpenWrt Target/Subtarget

mediatek/filogic

Steps to Reproduce

After upgrading to a firmware with sstp-client 1.0.20 (and pppd 2.5.x), an SSTP connection to a Windows RRAS-style server (MS-CHAPv2) that worked with sstp-client 1.0.15 now fails. PPP authentication succeeds, but the server immediately aborts the session right after sstpc sends the Connected message with the Crypto Binding attribute:

sstpc[4379]: Connected to sstp.example.com
sstpc[4379]: Started PPP Link Negotiation
pppd[4381]: pppd 2.5.2 started by root, uid 0
sstpc[4379]: Could not create password hash
pppd[4381]: CHAP authentication succeeded
sstpc[4379]: Sending Connected Message
sstpc[4379]: SEND SSTP CRTL PKT(112)
sstpc[4379]:     CRYPTO BIND(3): 104
sstpc[4379]: Connection Established
sstpc[4379]: RECV SSTP CRTL PKT(20)
sstpc[4379]:   TYPE(5): ABORT, ATTR(1):
sstpc[4379]:     STATUS INFO(2): 12
pppd[4381]: Terminating on signal 15
pppd[4381]: Modem hangup

The user-visible error is Connection was aborted, Value of attribute is incorrect (status 12): the server rejects the Crypto Binding attribute.

Cause (as far as I can tell):

Could not create password hash appears to come from the NT hash computation (MD4 of the UTF-16LE password) that sstpc uses to derive the MPPE keys for the Crypto Binding. In OpenSSL 3, MD4 lives in the legacy provider, which on OpenWrt is a separate package (libopenssl-legacy). Without it the hash cannot be created, the keys are wrong/empty, the Compound MAC is invalid, and the server aborts the connection. This explains why 1.0.15 worked and 1.0.20 does not on a fresh image.

After installing libopenssl-legacy the error disappears and the tunnel comes up.

Suggested fix:

The package currently depends on +libopenssl but not on +libopenssl-legacy. Please consider adding +libopenssl-legacy to DEPENDS of sstp-client (or at least documenting the requirement), since MS-CHAPv2 key derivation fails without it.

Config used (credentials removed):

config interface 'sstp0'
	option proto 'sstp'
	option server 'sstp.example.com'
	option log_level '4'
	option username '***'
	option password '***'
	option peerdns '0'
	option metric '60'
	option pppd_options 'defaultroute-metric 60'
Actual Behaviour

none

Confirmation Checklist
Dominant language
Makefile
Stars
4.7k
Forks
4k
Avg merge
3d 13h
Merged PRs (30d)
313

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openwrt/packages

All issues in openwrt/packages

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.