Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Stop code KERNEL_SECURITY_CHECK_FAILURE (0x139): read parameter 1, then work out which driver or device changed

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A computer or server stops on a blue screen reading KERNEL_SECURITY_CHECK_FAILURE, or a crash dump shows bug check 0x139. The name suggests a security problem. Microsoft's reference page says something narrower: the bug check "indicates that the kernel detects the corruption of a critical data structure". For the value the page explains at length, every cause it lists is a driver that damaged a list the kernel keeps, and the first parameter tells you which kind of damage was detected.

The sections below explain how to read that parameter, what Microsoft's page says about the value 3, and which checks you can make without a debugger. Everything before the Fix section only reads information.

What the error means

The Microsoft Learn page (Bug Check 0x139: KERNEL_SECURITY_CHECK_FAILURE, page dated 2025-12-13) gives the bug check a value of 0x00000139 and lists four parameters:

Parameter Description on the page
1 The type of corruption
2 Address of the trap frame for the exception that caused the bug check
3 Address of the exception record for the exception that caused the bug check
4 Reserved

The page carries a note that it is for programmers, and sends customers who receive a blue screen to a separate page on troubleshooting blue screen errors. Parameter 1 is the part an administrator can use, because the page ties each value to a type of corruption.

Likely causes

Parameter 1 values on the page, with the page's descriptions:

Parameter 1 Description on the page
0 A stack-based buffer is overrun (legacy /GS violation).
1 VTGuard instrumentation code detected an attempt to use an illegal virtual function table. Typically, a C++ object is corrupted, and then a virtual method call attempted to use the corrupted object's this pointer.
2 Stack cookie instrumentation code detected a stack-based buffer overrun (/GS violation).
3 A LIST_ENTRY is corrupted (for example, a double remove).
4 Reserved
5 An invalid parameter was passed to a function that considers invalid parameters fatal.
6 The loader did not properly initialize the stack cookie security cookie.
7 A fatal program exit was requested.
8 An array bounds check inserted by the compiler detected an illegal array indexing operation.
9 A call to RtlQueryRegistryValues was made specifying RTL_QUERY_REGISTRY_DIRECT without RTL_QUERY_REGISTRY_TYPECHECK, and the target value wasn't in a trusted system hive.
10 Indirect call guard check detected invalid control transfer.
11 Write guard check detected invalid memory write.
12 An attempt was made to switch to an invalid fiber context.
13 An attempt was made to assign an invalid register context.
14 The reference count for an object is invalid.

The page continues beyond 14 with values 18 to 29 and 37 to 39, covering, among others, an unsafe modification of read-only data (19), a cryptographic self-test failure (20), an invalid call from within DllMain (23), an invalid image base address (24), an out-of-bounds buffer access (28) and a corrupted RTL_BALANCED_NODE RBTree entry (29). Read the full table on the page for those values.

The value the page discusses at length is 3. A parameter 1 of 3 means a LIST_ENTRY, a link in one of the doubly linked lists that Windows and its drivers use, is corrupted. The page says "LIST_ENTRY corruption can be difficult to track down" because the inconsistency "is not necessarily detected at the time when the corruption occurred", so "some detective work may be necessary to identify the root cause". Its list of common causes of list entry corruption is all drivers:

  • A driver corrupted a kernel synchronization object, such as a KEVENT.
  • A driver corrupted a periodic KTIMER.
  • A driver mismanaged an internal LIST_ENTRY-style linked list, for example calling RemoveEntryList twice on the same entry.
  • A driver freed a data structure that contains a LIST_ENTRY without removing it from its list.
  • A driver used a LIST_ENTRY-style list in a concurrent fashion without proper synchronization.

The page adds that because many system components use LIST_ENTRY lists internally, resource mismanagement by a driver using system APIs might corrupt a list that the system manages. For a parameter 1 of 3, then, the page points at drivers and at the kernel components they call.

Prove the cause before changing anything

All of these only read.

  1. Note the value of parameter 1 shown on the blue screen or read it from the dump. The page says: "Using the parameter 1 table, and a dump file, you can narrow down the cause for many bug checks of this type."
  2. Open the dump file in a debugger, working on a copy if it comes from a production server. Microsoft's page on analysing a kernel-mode dump file (dated 2025-01-24) says to start WinDbg with the -z option:
windbg -y <SymbolPath> -i <ImagePath> -z <DumpFileName>

It also says that in most cases you begin by using !analyze, and that .bugcheck shows the bug check code and its parameters.

  1. Examine more than one dump. Microsoft's Resolution section says: "Multiple dump files should be examined to see if the stop code has similar characteristics, such as the code that's running when the stop code appears." As general advice, not Microsoft's words: the same driver or code path across dumps is a lead; different ones suggest several causes.
  2. Read the System log in Event Viewer. The page says: "Use the event log to see if there are higher level events that occur leading up to the stop code." It also says: "Look for critical errors in the system log that occurred in the same time window as the blue screen."
  3. Open Device Manager and look for devices marked with an exclamation point. The page says to look at the events log displayed in a driver's properties for any faulting driver.
  4. Make a list of what changed before the first stop: new hardware, new drivers, new system services. The page says: "Try to determine what changed in the system that caused the new bug check code to appear."

Example (illustrative): a back-office server begins to stop once or twice a day after a storage adapter driver was updated the previous week. Three dumps all show parameter 1 of 3, and the System log shows a driver message just before each stop. That ties the stop to the change in point 6 and gives the engineer one driver to deal with.

Fix

The page says that determining the cause of list entry corruption "typically requires the use of the debugger to gather other information", then gives general tips. Each tip that changes something is shaped below so that it can be reversed.

Remove or replace hardware added recently

Disruptive step: the next step removes a device the business may be using, and on a physical computer means shutting down. Anything depending on that device stops working until it is put back.

The page says: "If you recently added hardware to the system, try removing or replacing it. Or check with the manufacturer to see if any patches are available." First, write down what the hardware is, which slot or port it uses and which driver it installed. On a hosted server, ask the provider; they control the hardware.

Remove or replace the hardware that was added most recently, and run the computer as normal to see whether the stops continue.

To undo it: put the device back in the recorded slot or port and reinstall the recorded driver.

Update or remove a recently added driver or system service

Risk: the next step replaces or removes a driver, which can leave the device it controls not working, and a storage or network driver can leave the computer unable to reach its disks or the network. Do this only with another way into the machine, such as a console, and outside business hours.

The page says: "If new device drivers or system services have been added recently, try removing or updating them." First, note the name, version and date of the current driver from the device's properties in Device Manager, and keep a copy of the previous installer or driver package.

Update the driver to the manufacturer's current version, or uninstall the recently added driver or service, then restart if asked.

To undo it: reinstall the previous driver version recorded above from the saved package, and restart.

Scan for malware

The page's tips include: "Run a virus detection program. Viruses can infect all types of hard disks formatted for Windows, and resulting disk corruption can generate system bug check codes." It adds that the program should check the Master Boot Record. A scan does not change the computer unless it is set to quarantine or delete; check the setting so that nothing is removed before someone has looked at what was found.

Confirm the fix

  • The computer runs for longer than the longest interval between earlier stops, including its busiest period, with no new KERNEL_SECURITY_CHECK_FAILURE stop.
  • If a new dump does appear, parameter 1 and the code running at the time are compared with the earlier dumps: a change means the first cause was dealt with and another remains.
  • Device Manager shows no devices with an exclamation point, and the System log shows no repeat of the earlier critical errors.

What to watch afterwards

  • The next change to drivers, firmware or system services. Microsoft's guidance is to compare the time of a new stop with the time of a change.
  • Dumps kept from this stop. Keep them until the machine has run cleanly for a good while, so a repeat can be compared.
  • Stops on other computers with the same driver version, since every cause the page lists for list corruption is a driver fault.

Risks and limits

Microsoft's page is written for programmers: it gives debugger techniques for list corruption and general tips for everyone else, and no step-by-step repair. It gives no figures on how common each parameter 1 value is, and no named drivers. When the dumps point at a driver from a hardware or software vendor, the vendor's own support is the next step, with the dumps. On a hosted server the provider can read the dump and check the hardware.

Sources