Skip to content

fix(windows-service): Triple-quote SERVICE_BIN path to prevent injection (CVE-2025-54081)#659

Open
dkgkdfg65 wants to merge 1 commit into
AlkaidLab:masterfrom
dkgkdfg65:port_family/backport/cve-2025-54081-master
Open

fix(windows-service): Triple-quote SERVICE_BIN path to prevent injection (CVE-2025-54081)#659
dkgkdfg65 wants to merge 1 commit into
AlkaidLab:masterfrom
dkgkdfg65:port_family/backport/cve-2025-54081-master

Conversation

@dkgkdfg65
Copy link
Copy Markdown

backports upstream LizardByte/Sunshine f22b00d for CVE-2025-54081. one-character fix: wraps %SERVICE_BIN% in triple quotes in install-service.bat line 70 so sc create handles binary paths with spaces correctly.

AlkaidLab's variant uses !SC_CMD! / !SC_START_TYPE! (delayed expansion) instead of upstream's %SC_CMD%, so i kept that style and just added the triple-quote wrapper.

upstream: LizardByte@f22b00d
CVE: https://nvd.nist.gov/vuln/detail/CVE-2025-54081

haven't reinstalled the windows service to verify after this — the fix is mechanical and identical in effect to upstream's.

(cherry picked from commit f22b00d)
Signed-off-by: dkgkdfg65 <219107372+dkgkdfg65@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 17, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1b548608-5ba9-46c0-ac2f-0fec1c14e658

📥 Commits

Reviewing files that changed from the base of the PR and between 3d75ab0 and dbbc3b2.

📒 Files selected for processing (1)
  • src_assets/windows/misc/service/install-service.bat
📜 Recent review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Windows
🔇 Additional comments (1)
src_assets/windows/misc/service/install-service.bat (1)

70-70: LGTM!


Summary by CodeRabbit

Bug Fixes

  • 优化了 Windows 服务安装过程中二进制路径的引号处理,确保服务路径参数能准确传递至系统服务管理器,提升服务安装的稳定性和兼容性。

演示

此 PR 对 Windows 服务安装脚本进行了微调,修改了 sc 命令中服务二进制路径的引号处理方式。

变更内容

Windows 服务安装参数调整

层 / 文件 摘要
sc 命令 binPath 参数引号格式
src_assets/windows/misc/service/install-service.bat
服务控制管理器命令的 binPath 参数引号写法从 "%SERVICE_BIN%" 调整为 %SERVICE_BIN%,改变了向 SCM 传递二进制路径的字符串格式。

可能相关的 PR

审查工作量估计

🎯 2 (简单) | ⏱️ ~5 分钟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题清晰地概括了主要变更内容,即为CVE-2025-54081安全漏洞添加三重引号来防止路径注入。
Description check ✅ Passed 描述与变更集相关,说明了这是一个向上游提交的回溯,涉及CVE-2025-54081的修复。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

qiin2333 added a commit that referenced this pull request May 18, 2026
…atal mode (#662)

* ci(driver-deps): fork-friendly vmouse fetch via public mirror + non-fatal mode

Fork PRs (e.g. external CVE backports) cannot access org-scoped
secrets, so the private repo AlkaidLab/ZakoVirtualMouse download for
the vmouse driver fails and aborts CMake configure with FATAL_ERROR.
This blocked CI on PR #659 (CVE-2025-54081) even though the patch
itself was unrelated to the driver pipeline.

Two layered fixes:

1. Public mirror first (cmake/packaging/FetchDriverDeps.cmake):
   - New cache var VMOUSE_PUBLIC_REPO (default AlkaidLab/zako-vmouse-release).
   - _fetch_vmouse() now tries the public mirror via plain
     browser_download_url (no auth) before falling back to the private
     repo's GitHub API path. Public mirror release tag and asset
     filenames must match VMOUSE_DRIVER_VERSION.

2. Graceful degradation (DRIVER_DEPS_REQUIRED option):
   - New option DRIVER_DEPS_REQUIRED (default ON, preserves existing
     behavior).
   - When OFF, missing driver files become WARNING instead of
     FATAL_ERROR, per-driver _CHECK_DRIVER_AVAILABLE cache var is set,
     and packaging skips the affected driver entirely.
   - windows.cmake gates each driver's install(FILES ...) on its
     availability flag.
   - sunshine.iss.in adds 'skipifsourcedoesntexist' to the vmouse
     driver wildcard so Inno doesn't abort when the dir is empty.

3. Workflow (.github/workflows/main.yml):
   - Build Windows step now passes
     -DDRIVER_DEPS_REQUIRED=${DRIVER_DEPS_REQUIRED}, which evaluates to
     OFF only when github.event_name == 'pull_request' && head repo is
     a fork. All other triggers (push, internal PR, release) stay ON.

Net effect: fork PRs configure/build/package successfully (just
without the vmouse component); internal PRs and release builds are
unchanged.

* fix: apply CodeRabbit auto-fixes

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
qiin2333 added a commit that referenced this pull request May 19, 2026
…atal mode (#662)

* ci(driver-deps): fork-friendly vmouse fetch via public mirror + non-fatal mode

Fork PRs (e.g. external CVE backports) cannot access org-scoped
secrets, so the private repo AlkaidLab/ZakoVirtualMouse download for
the vmouse driver fails and aborts CMake configure with FATAL_ERROR.
This blocked CI on PR #659 (CVE-2025-54081) even though the patch
itself was unrelated to the driver pipeline.

Two layered fixes:

1. Public mirror first (cmake/packaging/FetchDriverDeps.cmake):
   - New cache var VMOUSE_PUBLIC_REPO (default AlkaidLab/zako-vmouse-release).
   - _fetch_vmouse() now tries the public mirror via plain
     browser_download_url (no auth) before falling back to the private
     repo's GitHub API path. Public mirror release tag and asset
     filenames must match VMOUSE_DRIVER_VERSION.

2. Graceful degradation (DRIVER_DEPS_REQUIRED option):
   - New option DRIVER_DEPS_REQUIRED (default ON, preserves existing
     behavior).
   - When OFF, missing driver files become WARNING instead of
     FATAL_ERROR, per-driver _CHECK_DRIVER_AVAILABLE cache var is set,
     and packaging skips the affected driver entirely.
   - windows.cmake gates each driver's install(FILES ...) on its
     availability flag.
   - sunshine.iss.in adds 'skipifsourcedoesntexist' to the vmouse
     driver wildcard so Inno doesn't abort when the dir is empty.

3. Workflow (.github/workflows/main.yml):
   - Build Windows step now passes
     -DDRIVER_DEPS_REQUIRED=${DRIVER_DEPS_REQUIRED}, which evaluates to
     OFF only when github.event_name == 'pull_request' && head repo is
     a fork. All other triggers (push, internal PR, release) stay ON.

Net effect: fork PRs configure/build/package successfully (just
without the vmouse component); internal PRs and release builds are
unchanged.

* fix: apply CodeRabbit auto-fixes

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@qiin2333 qiin2333 force-pushed the master branch 2 times, most recently from 4db4aa3 to e5579b9 Compare June 4, 2026 07:31
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