KERNEL_MODE_HEAP_CORRUPTION — stop code 0x13A — is Windows catching a driver red-handed in the kernel’s memory pool. Drivers allocate “heap” memory for their work, and they’re expected to stay inside their allocations, free memory exactly once, and never touch it afterward. When a driver breaks those rules — a buffer overflow, a double-free, a use-after-free — the heap’s integrity checks eventually notice the damage and Windows crashes rather than run on corrupted kernel memory. It’s the kernel equivalent of catching someone writing in another tenant’s ledger.
The frustrating part of 0x13A is that the blue screen almost never names the guilty driver — the corruption is usually discovered long after the guilty write happened. That makes Driver Verifier, Windows’ built-in driver stress tool, the centerpiece of the diagnosis. The sequence below builds up to it, clearing the easy causes first.
Why this happens
- Buggy third-party drivers. Graphics, network, and antivirus filter drivers are the classic heap corruptors.
- Outdated drivers on new Windows builds. Old drivers violating heap rules that newer Windows versions check more strictly.
- Corrupted driver installations. Mixed or partial driver files behaving unpredictably in the kernel heap.
- Faulty RAM. Bad memory corrupts heap contents independently of any driver bug.
- Incompatible security software. Kernel filters from antivirus/VPN tools mishandling heap allocations.
- Overclocked or unstable hardware. Timing faults that corrupt memory the heap manager then flags.
- Corrupted system files. Damage to the kernel’s own heap-management code producing false corruption signatures.
How to fix it
Work through these in order — diagnose first, then act.
Fix 1: Update graphics and network drivers
Clear the most common heap-corrupting drivers first.
- Clean-install the GPU driver from NVIDIA or AMD (custom install > clean installation).
- Update the Wi-Fi/Ethernet driver from your laptop maker’s support page — Dell, HP, or Lenovo all host model-specific builds.
- Update the chipset driver package as well; it includes storage and bus drivers that allocate from the kernel heap.
- Restart after each driver group and test with the workload that crashed.
- If crashes began after a specific driver update, roll that driver back instead of updating further.
The 24H2-specific edition of this stop code is detailed in how to fix KERNEL_MODE_HEAP_CORRUPTION in Windows 11 24H2 , and the post-update variant in fix KERNEL_MODE_HEAP_CORRUPTION after Windows 11 update .
Fix 2: Remove or update security and VPN software
Kernel filters are disproportionate heap-corruption offenders.
- Uninstall third-party antivirus using the vendor’s removal tool (not just Settings > Apps).
- Remove VPN clients, firewall utilities, and disk-encryption tools temporarily.
- Test on Microsoft Defender alone for several days of normal use.
- If stability returns, reinstall only the latest versions — old filter drivers are usually the problem.
- Never stack two real-time security products; their heap interactions are a known 0x13A source.
Fix 3: Run Driver Verifier to catch the culprit
Let Windows stress drivers until the guilty one crashes.
- Create a system restore point first — this is non-negotiable.
- Press Windows + R, type
verifier, and press Enter. - Choose Create custom settings, enable Special pool, Pool tracking, Force IRQL checking, and Deadlock detection.
- Choose Select driver names from a list, sort by Provider, and check all non-Microsoft drivers.
- Click Finish and restart. Use the laptop normally — Verifier will blue-screen (often with a different stop code naming the driver) when it catches corruption.
- After the crash, open the minidump in WinDbg (
!analyze -v) — the named driver is your culprit. - Boot into Safe Mode, run
verifier /reset, and restart to turn Verifier off, then update or remove the guilty driver.
Never verify all drivers including Microsoft’s — that creates noise and boot loops. Target third-party drivers only.
Fix 4: Test your RAM
If Verifier finds nothing, suspect the hardware.
- Run
mdsched.exeand check MemoryDiagnostics-Results in Event Viewer. - Run MemTest86 overnight from a USB stick for intermittent faults.
- Load BIOS defaults to clear unstable memory timings.
- Test RAM sticks individually if removable.
- Heap corruption with clean Verifier results and failing memory tests means the RAM — not a driver — was corrupting the heap all along.
Fix 5: Repair system files and update Windows
Fix the kernel’s own heap machinery.
- In Terminal (Admin):
DISM /Online /Cleanup-Image /RestoreHealth, thensfc /scannow. - Install every pending update in Settings > Windows Update — Microsoft fixes heap-manager bugs in cumulative updates.
- If a specific update preceded the crashes, check the Microsoft Update Catalog for a superseding fix.
- As a deeper repair, do an in-place upgrade from the Windows 11 download page , keeping files and apps.
- Retest before reinstalling third-party drivers — add them back one group at a time.
Fix 6: Clean-boot to isolate the offender
When Verifier is inconclusive, isolate by elimination.
- Run
msconfig, hide Microsoft services, disable the rest; disable all Startup apps; restart. - Stress the system — if 0x13A stops, a disabled component was corrupting the heap.
- Re-enable in halves to narrow it down, prioritizing RGB/fan control utilities, “optimizers,” and peripheral software.
- Update or permanently remove the offender.
- Pay special attention to software that installs virtual devices (virtual audio cables, virtual cameras) — their drivers are frequent heap violators.
Fix 7: Check thermals and reset hardware to stock
Unstable hardware corrupts memory that the heap checker then flags.
- Reset all overclocks/undervolts in tuning utilities and BIOS.
- Monitor CPU/GPU temperatures under load; clean vents and verify fans.
- Test with the manufacturer’s stock power plan and thermal profile.
- If crashes only occur under sustained load with high temperatures, cooling maintenance is the fix, not driver surgery.
- Persistent 0x13A at stock settings, current drivers, clean memory tests, and good thermals warrants manufacturer support — you’ve eliminated every software cause.
Closing
KERNEL_MODE_HEAP_CORRUPTION looks mysterious because the blue screen hides the culprit, but the investigation is mechanical: update the usual-suspect drivers, strip out kernel-filter software, then let Driver Verifier do what it was built for — crash the guilty driver in the act. Most cases end at Fix 3 with a named driver and a clean update. The mistake is shotgun-reinstalling drivers at random or, worse, reinstalling Windows while a single bad filter driver waits to corrupt the fresh heap. Catch the corruptor, remove it, and the kernel heap stays clean.
