AGENT SKILL

内核 Driver Verifier 违规分诊

windbg-kernel-verifier-triage

当内核转储文件包含 Driver Verifier 违规时使用;检查标志、错误检查子代码和可用的 I/O 影子状态。不适用于 Application Verifier 用户模式停止,也不适用于仅根据启用的标志推断违规。

License 许可
MIT
最近更新
2026-11-09
Stars
★ 510
Forks
41

01 前言 Front Matter

name
windbg-kernel-verifier-triage
description
Use when a kernel dump contains Driver Verifier violations; inspect flags, bugcheck subcodes, and available I/O shadow state. Not for Application Verifier user-mode stops or inferring a violation from enabled flags alone.

03 SKILL.md 正文

Driver Verifier Triage

Load windbg-diagnostic-method first if it is not already loaded in this conversation, and apply it throughout for evidence ranking, hypothesis testing, confidence calibration, independent review, and report validation. This skill adds the bug-family-specific commands and evidence requirements.

Scope

Driver Verifier checks kernel driver contracts. Application Verifier is a different user-mode facility; use windbg-user-heap-corruption-investigation for its heap stops. Enabled Driver Verifier flags alone do not prove a contract violation.

Use this skill when a verifier-class bugcheck or analysis identifies an actual violation. Examples include 0xC4, 0xC9, and 0xE6; inspect the exact code and parameters rather than treating every stop as the same family.

Workflow

1. Preserve code, subcode, and active configuration

!analyze -v
.bugcheck
!verifier
k

Record the bugcheck, subtype/subcode, offending operation and driver when reported, enabled checks, target build, and evidence availability. Decode each subcode against its documented contract. Existing output may be incomplete in a small dump; do not discard captured evidence merely because live configuration is now different.

2. Decode available I/O history

When the violation supplies an appropriate IRP address and I/O verification state is available:

!iovirp <irp-address>
!irp <irp-address>

Shadow state may preserve information lost from the live request. Correlate it with the decoded contract and use windbg-kernel-irp-lifecycle-triage for completion, cancellation, pending state, and ownership.

3. Recover context or follow dependencies

  • Saved exception/trap context: windbg-kernel-bugcheck-triage.
  • Lock-order evidence: windbg-kernel-lock-deadlock-triage.
  • Outstanding or power request: windbg-kernel-irp-lifecycle-triage.

Avoid cyclic dispatch. Carry the evidence already collected to the next skill; re-enter only when a distinct evidence requirement exists.

4. Investigate uncovered violations

For a generic DDI violation, identify the exact precondition (IRQL, lifetime, parameters, or ownership) and the driver call that broke it. For a DMA violation, inspect supported adapter/map/unmap and buffer-lifetime evidence for that subcode. This package does not provide a specialized decoder for every DDI or DMA case; state the gap and continue from documentation and driver source.

Controlled repro

Do not enable Driver Verifier without approval. It can deliberately crash the system and expose boot-critical defects. Use a recoverable test machine, save the current configuration, select relevant vendor drivers/checks, and agree on rollback before restarting. Do not verify every installed driver by default.

Read-only configuration inspection on a test machine:

verifier /querysettings

verifier /reset clears settings and normally requires a restart to stop verification; it is a configuration change, not a harmless query. Restore previous intentional settings rather than unconditionally clearing them.

Validation

Name the exact violated contract, link the recorded operation to driver source, and test that the remedy satisfies it under the same checks and workload. Record dump/verification limitations and unverified assumptions. Passing a single repro is not proof that every driver path is safe.

References

Feedback

Follow FEEDBACK.md and submit reviewed, sanitized feedback to WinDbg-Feedback. Include windbg-kernel-verifier-triage and the package version from plugin.json; do not automatically upload dumps or proprietary driver source.

04 同仓库更多 Skills

microsoft
microsoft/win-dev-skills

技能目录测试示例

sample-skill

用于测试目录工具的示例技能。在测试 CI 时使用。不用于实际工作。

软件开发工程师示例与演示技能
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 等待链阻塞分析

windbg-user-wait-chain-analysis

当应用、服务或用户态驱动宿主程序因锁、COM/RPC、I/O 或其他进程而无响应时,用于追踪阻塞链。不适用于仅由异常栈导致的崩溃。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 虚拟内存耗尽分析

windbg-user-virtual-memory-exhaustion

当原生应用、服务或用户态驱动宿主程序分配失败时使用;用于区分虚拟地址(VA)耗尽、碎片化和提交内存(commit)压力。不适用于托管 .NET 堆增长、仅凭单个快照证明内存泄漏,或内存损坏场景。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg TTD 时序反向调试分析

windbg-user-ttd-reverse-debugging-triage

当应用、服务或用户态驱动宿主程序有 TTD(Time Travel Debugging)录制,且需要追溯早期的调用、写入或对象生命周期时使用。不适用于内核回放,也不适用于从普通转储文件获取历史记录。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 协程互斥锁挂起排查

windbg-user-mutex-held-across-co-await

当应用、服务或用户态驱动的 C++ 协程代码在挂起点持有线程关联锁,随后发生挂起或失败时使用。不适用于所有协程崩溃场景,也不用于锁的性能选型。

软件开发工程师调试与故障排查
★ 510
microsoft
microsoft/win-dev-skills

WinDbg 用户态堆损坏排查

windbg-user-heap-corruption-investigation

当应用、服务或用户态驱动宿主程序堆分配失败,或 Application Verifier 检测到损坏时使用;可检查历史记录与内存边界。不适用于内核池损坏或普通的内存不足(OOM)。

软件开发工程师调试与故障排查
★ 510