Skip to content

应用在部分未打齐最新累积补丁的 Windows 10 设备上双击后完全没有反应,且无任何 UI 报错弹窗。 #648

Description

@PANDAJSR

检查清单 | Checklist

  • 您在生产环境中发现了此问题,并稳定复现 | You have encountered this issue in a production environment and can reliably reproduce it.
  • 您尝试了自行解决(包括但不限于重置配置文件,全新安装)但始终无法解决 | You have tried to resolve it yourself (including but not limited to resetting config files and doing a clean install), but could not fix it.
  • 您可以在其它设备上稳定复现此问题 | You can reliably reproduce this issue on another device.
  • 您确认此问题并非由实验性功能引起 | You confirm that this issue is not caused by an experimental feature.
  • 您确认此问题严重影响了使用并且可明确定义为漏洞或缺陷 | You confirm that this issue seriously affects usage and can be clearly defined as a bug or defect.
  • 您了解开发者无法及时回复和及时修复 | You understand that developers may not respond or fix issues promptly.
  • 您确认、知晓无意义提交 Bug 类反馈的后果,并同意以下条款 | You confirm that you understand the consequences of submitting meaningless bug reports and agree to the following terms.
  • 被认定为无意义的反馈将会被直接关闭 | Feedback deemed meaningless will be closed directly.
  • 多次提交无意义的 Bug 类反馈将会被处以 7 天内不再接受您反馈的处罚 | Repeated meaningless bug reports will result in your feedback being suspended for 7 days.
  • 我已经仔细阅读过选项里的内容,并且知道这个选项不用勾选。 | I have carefully read the options and know that this option does not need to be checked.

软件版本 | App Version

1.8.0.4

操作系统及版本 | OS & Version

鸿合 Windows 10 21H2

问题描述 | Description

问题现象
应用在部分未打齐最新累积补丁的 Windows 10 设备(常见于内网机房、旧版系统、教学大屏等)上双击后完全没有反应,启动即发生静默致命崩溃(Process Exit),且无任何 UI 报错弹窗。

根本原因

  • 编译机制默认开启 CET:高版本 .NET(.NET 9 / .NET 10)在编译/打包时默认启用了硬件影子栈兼容性标记(Control-flow Enforcement Technology,即 /CETCOMPAT)。
  • 旧版 Win10 存在系统级缺陷:旧版本 Windows 10 内核(如 ntdll.dll 低于 10.0.19041.5007)在解析该 PE 头的 CET 标志时存在兼容性 Bug,导致进程初始化阶段直接被系统终止。

推荐解决方案(开发端修复)

在主程序(以及所有独立宿主/子进程程序,如 .LiquidGlassMagHost)的 .csproj 文件中显式关闭 CET 兼容性,重新编译打包即可:

<PropertyGroup>
  <!-- 显式禁用 CETCompat,解决旧版 Win10 上的启动崩溃 -->
  <CetCompat>false</CetCompat>
</PropertyGroup>

补充说明:此配置仅关闭硬件级影子栈保护,对纯托管 .NET 应用程序的正常逻辑与常规安全性没有任何影响,但能极大提升对未更新系统的向下兼容性。

真实教室环境截图(别问我为啥在大屏上用CC,问就是新班主任不管):

Image

复现步骤 | Steps to Reproduce

要复现此问题,需要满足“支持 CET 的现代硬件”与“未打齐 2024 年 10 月安全补丁的 Windows 10 系统”两个核心条件。

复现所需环境

硬件要求:必须在支持 Intel Tiger Lake(第 11 代 Core 及以上)或 AMD Zen 3(Ryzen 5000 及以上)的真机(或开启了 CPU 虚拟化传递的虚拟机)上测试。旧 CPU 不具备硬件影子栈,无法触发此底层指令校验。

系统环境:安装未更新至最新补丁的 Windows 10(如 21H2 / 22H2 原始 ISO,确保 ntdll.dll 版本低于 10.0.19041.5007,即未安装 KB5044273 补丁)。

开发环境:.NET 9 或 .NET 10 SDK。

Gemini 说的,我并未实际尝试复现()

期望结果 | Expected Behavior

修复描述的问题,显式关闭 CET 兼容性

其他补充信息 | Additional Info

上传有关文件 | Upload relevant files

No response

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions