sodcalculator

10 Tech How-To

Fix Bug Check 0x139 Kernel Security Check Failure

Guide 10-59590 · Updated · Step by step

Bug check 0x139, also known as KERNEL_SECURITY_CHECK_FAILURE, is a Windows Blue Screen of Death (BSOD) error that appears when the operating system detects that a critical kernel structure has been corrupted or that a security check has failed. This guide walks you through the most common causes and provides clear, actionable steps to diagnose and resolve the issue, from simple driver updates to deeper system repairs.

What You’ll Need

  • Administrator access to your Windows PC
  • A stable internet connection
  • Your Windows installation media (USB or DVD) or access to the Windows Recovery Environment (WinRE)
  • Optional: a second computer to download drivers or create a bootable USB

Step-by-Step

  1. Note the stop code and any additional parameters. When the BSOD appears, write down the full error message, especially the four hexadecimal parameters after the stop code. These can help pinpoint the faulty component. If the screen flashes too quickly, disable automatic restart: go to Settings > System > About > Advanced system settings, click Settings under Startup and Recovery, and uncheck Automatically restart.
  2. Boot into Safe Mode. Restart your PC and press F8 (or Shift + Restart from the login screen) to access Advanced Startup Options. Select Troubleshoot > Advanced options > Startup Settings  > Restart, then press 4 or F4 to boot into Safe Mode. If Safe Mode loads without a crash, the issue is likely driver-related rather than hardware.
  3. Run the Windows Memory Diagnostic. In Safe Mode, press Windows Key + R, type mdsched.exe, and press Enter. Choose Restart now and check for problems. Let the test complete; it can take 20-30 minutes. If errors appear, faulty RAM is a likely culprit.
  4. Check disk integrity. Open Command Prompt as Administrator (right-click Start > Command Prompt (Admin)) and run sfc /scannow. After it finishes, run DISM /Online /Cleanup-Image /RestoreHealth. These commands repair corrupted system files that can cause the 0x139 error.
  5. Update or roll back drivers. In Safe Mode, open Device Manager (right-click Start > Device Manager). Expand categories and look for devices with a yellow exclamation mark. Right-click each and select Update driver > Search automatically. Pay special attention to graphics, network, and chipset drivers. If the crash started after a recent driver update, use Properties > Driver tab > Roll Back Driver.
  6. Uninstall recently installed software. If the problem began after installing a new program, go to Settings > Apps > Installed apps, find the software, and uninstall it. Security suites and system utilities (like overclocking tools) are common triggers.
  7. Disable overclocking. Enter your BIOS/UEFI (usually by pressing Del, F2, or F10 during startup) and reset all settings to default, or manually disable any CPU, GPU, or RAM overclocking. Run your system at stock speeds to see if the crash stops.
  8. Perform a Clean Boot. In Safe Mode, press Windows Key + R, type msconfig, and go to the Services tab. Check Hide all Microsoft services, then click Disable all. Go to the Startup tab and click Open Task Manager. Disable all startup items. Restart normally. If the error is gone, re-enable services in batches to find the culprit.
  9. Check for Windows updates. Go to Settings > Update & Security > Windows Update and click Check for updates. Install all pending updates, including optional driver updates, then restart.
  10. Run a hardware diagnostic. If software steps fail, test your hardware. Use the built-in Windows Memory Diagnostic again (if not done), and run chkdsk /f /r from Command Prompt to scan for bad sectors. For CPU stress testing, use tools like Prime95 or IntelBurnTest, and for GPU, use FurMark. Monitor temperatures with HWMonitor to rule out overheating.
  11. Repair or reset Windows. As a last resort, boot from your installation media. Select Repair your computer > Troubleshoot > Reset this PC. Choose Keep my files to reinstall Windows while preserving personal data, or Remove everything for a clean slate.

Common Mistakes

  • Skipping Safe Mode: Running diagnostic tools in normal mode can be ineffective if the system crashes constantly. Safe Mode loads only essential drivers, making it easier to isolate the problem.
  • Ignoring the memory test: RAM errors are a leading cause of 0x139. Many users skip this step and waste hours on driver updates.
  • Using outdated installation media: An old Windows ISO may not have the latest fixes. Always use the Media Creation Tool to create fresh media.
  • Overlooking third-party security software: Antivirus and firewall programs that hook deep into the kernel can trigger this error. Temporarily uninstall (not just disable) them to test.
  • Not checking event logs: The Event Viewer (eventvwr.msc) under Windows Logs > System often shows the exact faulting driver or module. Skipping this leaves you guessing.

Tips

  • Keep a system restore point before making major changes. Create one in System Properties > System Protection.
  • Update your BIOS/UEFI to the latest version from your motherboard manufacturer’s website. This can fix compatibility issues with RAM and CPUs.
  • Use reliable driver download sources only (manufacturer websites or Windows Update). Avoid third-party driver updaters that can install incorrect versions.
  • If you have multiple RAM sticks, test them one at a time in different slots to isolate a faulty module.
  • Check the Windows minidump files. Use WinDbg (from the Microsoft Store) to open C:\Windows\Minidump files. The !analyze -v command often identifies the exact driver.

Troubleshooting

If the steps above do not resolve the issue, consider these additional angles:

  • If the crash persists in Safe Mode: This points to hardware failure or a corrupted Windows installation. Run the memory diagnostic and chkdsk again. If they pass, proceed directly to the Reset this PC option.
  • If the crash only happens under load: This suggests overheating or a failing power supply. Monitor temperatures and voltages. Reseat your RAM and GPU, and clean dust from fans and heatsinks.
  • If the error mentions a specific file (like ntoskrnl.exe or a .sys file): Search the file name online. It usually belongs to a specific driver. Uninstall that driver or the associated software.
  • If you recently changed hardware: Remove the new component and test with the old one. If the error disappears, the new hardware is incompatible or faulty.
  • If you suspect malware: Run a full offline scan with Windows Defender (Settings > Update & Security > Windows Security > Virus & threat protection > Scan options > Microsoft Defender Offline scan).
  • If all else fails: Perform a clean installation of Windows using the Media Creation Tool. This eliminates any software-related issues. Back up your data first.

Frequently Asked Questions

What exactly causes bug check 0x139?

The most common causes are faulty RAM, outdated or corrupt device drivers, overclocking instability, corrupted system files, or incompatible third-party software that interacts with the Windows kernel.

Can I fix 0x139 without reinstalling Windows?

Yes, in most cases. Start with Safe Mode, run SFC and DISM, update drivers, and check memory. Reinstalling Windows is a last resort, not the first step.

Is this error caused by a virus?

Rarely, but rootkits or malware that hook into the kernel can trigger it. Running a full offline antivirus scan is a good precautionary step.

How do I read the minidump files to find the culprit?

Install WinDbg from the Microsoft Store, open the .dmp file from C:\Windows\Minidump, and run !analyze -v. The output will often list the faulting module and driver.

Will updating my BIOS help?

It can, especially if you have a newer CPU or RAM that the current BIOS doesn’t fully support. Check your motherboard manufacturer’s website for the latest version and release notes.

Can a failing hard drive cause this BSOD?

Yes, though less commonly than RAM. Corrupted system files on a failing drive can lead to kernel security check failures. Run chkdsk /f /r to check for bad sectors.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →