Skip to content

How-ToOS

DRIVER_OVERRAN_STACK_BUFFER in Windows 11: How to Find and Fix the Faulty Driver

DRIVER_OVERRAN_STACK_BUFFER (0xF7) means Windows caught a driver writing past the end of a stack buffer and shut down to stop it being exploited. Here's how to find the driver responsible and update, roll back or remove it, plus what to do if no driver is named.

By , Systems & Technical Editor

5 min read

DRIVER_OVERRAN_STACK_BUFFER in Windows 11: How to Find and Fix the Faulty Driver

DRIVER_OVERRAN_STACK_BUFFER is a blue screen that Windows triggers deliberately. A driver has written more data into a small area of memory than it was meant to, and Windows shuts down rather than risk that being used to take over the PC. The cause is nearly always a specific driver, so the job is to find out which one and update, roll back or remove it. The technical details come from Microsoft's documentation, credited at the end, and the order of the steps is our advice.

What Windows is telling you

Microsoft lists DRIVER_OVERRAN_STACK_BUFFER as bug check 0xF7 (full value 0x000000F7) and says it "indicates that a driver has overrun a stack-based buffer".

Microsoft's explanation of the cause is that a driver overran a stack-based buffer or local variable "in a way that would have overwritten the function's return address and jumped back to an arbitrary address when the function returned". It adds that this is "the classic "buffer overrun" hacking attack" and that "The system has been brought down to prevent a malicious user from gaining complete control of it."

In plain terms, Windows has caught a driver misbehaving in a way that could be exploited, and stopped. That doesn't mean your PC has been attacked. A buggy driver can trigger the same check, and on an ordinary home PC that's far more likely, but it's a good reason to keep Windows' security protections switched on while you fix it.

The four parameters are security check values that only matter to developers, so you don't need to note them.

Step 1: Look for a driver name

Microsoft Support says the blue screen shows the stop code and, "if available, the module name of the code that was being executed" when the problem occurred. If you see a file ending in .sys, write it down and search for it to find out which hardware or software it belongs to.

If the PC restarts too quickly to read, check the System log in Event Viewer after Windows starts. If Windows saved a crash dump, Microsoft's advanced guidance describes opening it in WinDbg and running !analyze -v, then reading the STACK_TEXT section, which "should tell you what DLL is causing the crash". Microsoft's 0xF7 page adds that "The last routine on the stack before the buffer overrun handlers and bug check call is the one that overran its local variable." Our minidump analysis guide walks through it, and our free BSOD analysis tools roundup lists simpler tools that read the same dump files.

Step 2: Update, roll back or remove that driver

Microsoft's advice is to "Disable or remove any drivers or services that were recently added", and to contact the hardware or software vendor for driver updates when "The error message indicates that a specific driver is causing the problem". It also suggests rolling back changes or "reverting to the last-known working state".

What that means in practice, in our view:

  • The crashes started after a driver update. Roll it back in Device Manager, or for a graphics driver, see our guide to rolling back a graphics driver.

  • The driver is old. Download the current version from the hardware maker's website. For graphics drivers, a clean install with DDU removes leftovers from previous versions.

  • The driver belongs to a utility rather than hardware. Anti-cheat software, VPNs, virtual audio or network devices, RGB and fan-control tools and third-party antivirus all install their own drivers. Uninstall the most recently added ones first.

Microsoft Support's basic steps also include checking Device Manager for devices marked with an exclamation point, updating their drivers and, if that doesn't help, disabling or uninstalling the device. Install the latest Windows updates as well.

Step 3: Use safe mode if Windows won't stay up

If the crash happens during startup, Microsoft says "you might be able to use safe mode to disable the driver in Device Manager". Microsoft Support describes safe mode as starting Windows "in a limited state, where only the bare essentials services and drivers are started", and notes that if a problem doesn't reappear in safe mode, you can rule out the default settings, basic device drivers and services as possible causes.

To get there, Microsoft's Windows Recovery Environment (WinRE) documentation says you can open Settings > System > Recovery and select Restart now under Advanced startup, or hold Shift while selecting Restart from the power menu on the sign-in screen. Then choose Troubleshoot > Advanced options > Startup Settings > Restart, and when the list of options appears, press 4 or F4 for safe mode.

If Windows won't start at all, you don't need to get into Windows first. Microsoft says WinRE starts automatically after "Two consecutive failed attempts to start Windows", and the same Troubleshoot menu is there.

Step 4: Use Driver Verifier if the name isn't obvious

When no driver is named, Driver Verifier can help catch the one that's breaking the rules. Microsoft estimates "that about 75 percent of all stop errors are caused by faulty drivers", but it also warns that Driver Verifier "consumes lots of CPU and can slow down the computer significantly" and may cause more crashes. Create a restore point first.

Run verifier from an administrator command prompt and choose Create standard settings. Don't try to verify every driver at once; Microsoft says that can make the system unusable. Start with third-party drivers, especially recently installed ones. When you've finished, Microsoft says to run verifier /reset and restart. Our Driver Verifier guide has the full walkthrough.

Step 5: Restore or repair Windows

If you can't find the driver, roll Windows back. Microsoft says System Restore "reverts the system files, registry settings, and installed programs" to how they were when the restore point was made. Open it by typing rstrui.exe in the Run box (Windows key + R), or from the recovery environment under Troubleshoot > Advanced options > System Restore. If your drive is encrypted, Microsoft notes you'll need your BitLocker key in the recovery environment.

You can also repair Windows' own files from an administrator command prompt with DISM.exe /Online /Cleanup-image /Restorehealth followed by sfc /scannow. As our advice, if the crashes keep coming with no driver named, run a memory test too, because faulty RAM can corrupt data in ways that look like a driver bug. Microsoft's advanced guidance includes running "any relevant hardware and memory tests", and our MemTest86 guide covers a thorough test.

The bottom line

DRIVER_OVERRAN_STACK_BUFFER (bug check 0xF7) means Windows caught a driver writing past the end of a stack buffer and shut down to stop it being exploited. It's almost always a driver problem, so look for a .sys file name on the blue screen, in Event Viewer or in a crash dump, then update, roll back or uninstall that driver, using safe mode if Windows won't stay up. If nothing is named, run Driver Verifier on third-party drivers, then use System Restore, DISM and SFC, and test your RAM.

Sources

  1. 01Bug Check 0xF7: DRIVER_OVERRAN_STACK_BUFFER (Microsoft Learn)
  2. 02Advanced troubleshooting for stop or blue screen errors (Microsoft Learn)
  3. 03Troubleshooting Windows unexpected restarts and stop code errors (Microsoft Support)
  4. 04Driver Verifier (Microsoft Learn)
  5. 05Windows Recovery Environment (Windows RE) technical reference (Microsoft Learn)
  6. 06Windows startup settings (Microsoft Support)
  7. 07System Restore (Microsoft Support)
  8. 08Use the System File Checker tool to repair missing or corrupted system files (Microsoft Support)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best Free Android Screen Mirroring Apps for PC (2026)

Best Picks

Best Free Android Screen Mirroring Apps for PC (2026)

The best free apps to mirror and control your Android phone on a PC in 2026: scrcpy for almost any phone, Phone Link on supported models, Escrcpy and QtScrcpy for a graphical interface, and Vysor for browser and iPhone support.

Hannah Vance6 min

scrcpy vs Phone Link: Best Way to Use Android Apps on a PC?

Versus

scrcpy vs Phone Link: Best Way to Use Android Apps on a PC?

scrcpy and Microsoft Phone Link both put your Android phone's apps on a Windows PC for free. We compare phone support, setup, how each shows your apps, extra features and privacy to help you pick the right one.

Callum Reid5 min

How to Mirror and Control Your Android Phone on a PC with scrcpy

How-To

How to Mirror and Control Your Android Phone on a PC with scrcpy

scrcpy is a free, open-source app that mirrors your Android phone's screen and sound on a Windows PC and lets you control it with your mouse and keyboard. We show how to enable USB debugging, install it, connect over USB or Wi-Fi, use the best shortcuts and options, and fix common errors.

Marcus Thorne7 min

Best Vector Databases for Local RAG on Your PC in 2026

Best Picks

Best Vector Databases for Local RAG on Your PC in 2026

The best vector databases for running private RAG and document search on your own PC: Qdrant, Chroma, pgvector, LanceDB, Milvus and Weaviate, with licences, how each runs, what to watch out for and the hardware that matters.

Hannah Vance6 min