fix(security): reject untrusted client certificates#710
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Summary by CodeRabbit发布说明
总体概览在 OpenSSL 证书验证回调函数中,删除了 变更内容证书验证回调错误处理
🎯 2 (Simple) | ⏱️ ~8 分钟 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thanks for the context. I agree that That is the exact condition called out by GHSA-ph75-mgxh-mv57. This PR removes that case from the shared callback, so both |
|
One important detail is that
|
|
@WatchKitty Thank you for your review. OK, I just looked at last year's modification history, And |
|
@Yundi339 Thanks for the explanation. You’re right — I should have verified the actual Since this case has already been handled and tested on your side, this PR is unnecessary. Sorry for the noise, and I’ll close it. |


Summary
X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLYas a successful client-certificate verification result insrc/crypto.cpp.v2026.516.143833.Root Cause
Sunshine's HTTPS client-certificate authentication path uses
cert_chain_t::verifyfromsrc/crypto.cpp. The custom OpenSSL verification callback previously converted an unknown local issuer error into success, which could allow an untrusted certificate chain to pass authentication.Security Impact
This closes the authentication-bypass condition described in the upstream critical advisory for protected Sunshine HTTPS endpoints. The change mirrors the upstream fix commit
888a6bb0and the patched releasev2026.516.143833.Validation
rgconfirmedX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLYis no longer allowed insrc/crypto.cpp.git diff --checkpassed.cmakeis not available in the current Windows PATH, and the repository preset expects an MSYS2 UCRT64 shell.Notes
codex/prefix.References