KERNEL_SECURITY_CHECK_FAILURE
Code: 0x139 (313)
As HRESULT:- S: 0 (Success)
- C: 0 (Microsoft-defined)
- N: 0 (Not an NTSTATUS value)
- Facility: 0x000 (FACILITY_NULL: Default)
- Code: 0x0139 (313)
- Sev: 0 (STATUS_SEVERITY_SUCCESS)
- C: 0 (Microsoft-defined)
- Facility: 0x000 (Default)
- Code: 0x0139 (313)
Parameters
| Parameter | Description |
|---|---|
1 | The type of corruption. For more information, see the following table. |
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 |
Description
The KERNEL_SECURITY_CHECK_FAILURE bug check has a value of 0x00000139, and indicates that the kernel detects the corruption of a critical data structure.
Important
This article is for programmers. If you're a customer who receives a blue screen error code while using your computer, see Troubleshoot blue screen errors.
Cause
Using the parameter 1 table, and a dump file, you can narrow down the cause for many bug checks of this type.
LIST_ENTRY corruption can be difficult to track down. This bug check indicates that an inconsistency was introduced into a doubly linked list (detected when an individual list entry element is added to or removed from the list). Unfortunately, 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.
Common causes of list entry corruption include:
- A driver corrupted a kernel synchronization object, such as a KEVENT (for example double initializing a KEVENT while a thread was still waiting on that same KEVENT, or allowing a stack-based KEVENT to go out of scope while another thread was using that KEVENT). This type of bug check typically occurs in nt!Ke* or nt!Ki* code. It can happen when a thread finishes waiting on a synchronization object or when code attempts to put a synchronization object in the signaled state. Usually, the synchronization object being signaled is the one that's corrupted. Sometimes, Driver Verifier with special pool can help track down the culprit (if the corrupted synchronization object is in a pool block that's already freed).
- A driver corrupted a periodic KTIMER. This type of bug check typically occurs in nt!Ke* or nt!Ki* code and involves signaling a timer, or inserting or removing a timer from a timer table. The timer being manipulated may be the corrupted one, but it might be necessary to inspect the timer table with !timer (or manually walking the timer list links) to identify which timer is corrupted. Sometimes, Driver Verifier with special pool can help track down the culprit (if the corrupted KTIMER is in a pool block that's already freed).
- A driver mismanaged an internal LIST_ENTRY-style linked list. A typical example would be calling RemoveEntryList twice on the same list entry without reinserting the list entry between the two RemoveEntryList calls. Other variations are possible, such as double inserting an entry into the same list.
- A driver freed a data structure that contains a LIST_ENTRY without removing the data structure from its corresponding list, causing corruption to be detected later when the list is examined after reusing the old pool block.
- A driver used a LIST_ENTRY-style list in a concurrent fashion without proper synchronization, resulting in a torn update to the list.
In most cases, you can identify the corrupted data structure by walking the linked list both forward and backwards (the dl and dlb commands are useful for this purpose) and comparing the results. Where the list is inconsistent between a forward and backward walk is typically the location of the corruption. Since a linked list update operation can modify the list links of a neighboring element, you should look at the neighbors of a corrupted list entry closely, as they may be the underlying culprit.
Because many system components internally utilize LIST_ENTRY lists, various types of resource mismanagement by a driver using system APIs might cause linked list corruption in a system-managed linked list.
Resolution
Determining the cause of list entry corruption issues typically requires the use of the debugger to gather other information. 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.
For more information, see Crash dump analysis using the Windows debuggers (WinDbg), Using the !analyze Extension and !analyze.
Use the event log to see if there are higher level events that occur leading up to the stop code.
These general troubleshooting tips may be helpful.
- 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.
- If new device drivers or system services have been added recently, try removing or updating them. Try to determine what changed in the system that caused the new bug check code to appear.
- Check the System Log in Event Viewer for other error messages that might help pinpoint the device or driver that is causing the error. Look for critical errors in the system log that occurred in the same time window as the blue screen.
- Look in Device Manager to see if any devices are marked with the exclamation point (!). Review the events log displayed in driver properties for any faulting driver. Try updating the related driver.
- 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. Make sure the virus detection program checks the Master Boot Record for infections.
- For more general troubleshooting information, see Analyze Bug Check Blue Screen Data.
See also
Article text from the Windows driver documentation (opens in a new tab), by Microsoft, under the CC BY 4.0 (opens in a new tab) licence.
Associated Modules
| Module | Code | Found in | Description |
|---|---|---|---|
| EventCreate.exe | 0x139 | 78.11011 | %1 |
| KernelBase.dll | 0x139 | 8.1 | Operation is not allowed on a file system internal file. |
| kernel32.dll | 0x139 | 8.11011 | Operation is not allowed on a file system internal file. |
| webservices.dll | 0x139 | 78.11011 | The number of characters decoded (%1) did not equal the number of characters expected (%2). |
| 4 entries | |||