大网数据广告活动
启动与系统组件

Bug check 0x7E occurs when Device Guard is active

· 52CE 我爱测

This article describes a problem that causes some Windows 10 drivers may to crash with bug check 0x7E if Device Guard is active. This problem affects the way in which different builds of Windows 10 handle allocations that straddle two pages.

This article introduces a problem that causes some Windows 10 drivers may to crash with bug check 0x7E if Device Guard is active.

Original product version:   Windows 10
Original KB number:   3194715

Summary

Assume that you're developing kernel mode device drivers, and you try to load a driver (other than a boot driver) that was built with the /IntegrityCheck linker option and signed with page hashes. In this situation, bug check 0x7E may be returned in Windows 10 Build 10586 (TH2) when Device Guard is active.

The issue is caused by an OS deficiency that prevents HVCI from promoting a page to EXECUTE privilege, when the image has been previously validated by CI. This behavior may occur when the image is linked with /IntegrityCheck, is signed with /PH (page hashes), and is mapped into a user mode process before being loaded as a kernel driver.

As of RS1, HVCI checks for this condition and therefore avoids the bug check. However, the driver is still blocked unless it's a boot driver. This behavior occurs when HVCI/Device Guard is active on devices that support Secure Boot (for example, Surface Pro 3 and other modern devices).

When this issue occurs, it may trigger bug check 0x7E with at least an exception error 0xC0000005 occurring in GsDriverEntry().

More information

Two commands may affect this behavior:

When both of these commands are enabled, Windows 10 may behave unexpectedly as follows, depending on the build:

  • Build 10240: No issue seen.
  • Build 10586: Bug check 0x7E. This may occur if there is relocation in the driver that does not straddle two pages. In this case, the scenario that's described in the 'Summary' section occurs.
  • Build 14393 (Redstone 1): An entry made in System events but the driver is blocked on load (except at boot time, when the driver will load without a problem).

To resolve this issue in Build 10586, we recommend that you disable page hashes by using the /NPH switch with Signtool. Because page hash checking is a performance option, disabling this option has the least effect on security.

This method can also be used in Build 14393 and later to allow the driver to load if the issue is present unless the driver has a relocation that straddles two pages (in which case it still will not load). You can determine this by including the /MAP command in the linker and then examining the output. For more information, see /MAP (Generate Mapfile).

To avoid a relocation that straddles two pages, do not use #pragma pack(1) anywhere in the driver. Default page alignment will not cause a page straddling issue.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 09/04/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。