How To Fix DRIVER_OVERRAN_STACK_BUFFER Blue Screen
DRIVER_OVERRAN_STACK_BUFFER is a blue screen with the stop code 0xF7.
Microsoft says it means a driver has overrun a stack-based buffer.
Windows stops on purpose when it sees this, so the goal is to find and replace the driver or software that triggered it.
Table of Contents
- Quick answer
- What DRIVER_OVERRAN_STACK_BUFFER means
- Why Windows stops the PC
- What the parameters mean
- Start with the basics
- Install Windows and driver updates
- Update, roll back or remove the driver
- Use Safe Mode when the PC crashes at startup
- Repair Windows files
- Find the driver in the crash dump
- Test drivers with Driver Verifier
- Restore or reset Windows
- When to contact support
- What to collect before you ask for help
- Sources and related guides
- More driver and PC software guides
Quick answer
Use this table to pick a starting point.
| If this is true | Try this |
|---|---|
| The error started after a driver or hardware change | Roll back the driver or remove the new device |
| The PC reaches the desktop | Check Windows Update, then update drivers in Device Manager |
| The PC crashes during startup | Boot into Safe Mode and disable the driver |
| Crashes continue after those steps | Run DISM and SFC, then restore or reset Windows |
| You want to find the exact driver | Open the crash dump in WinDbg and read the stack |
What DRIVER_OVERRAN_STACK_BUFFER means
The bug check has the value 0x000000F7.
The stack is a small area of memory where a function keeps its local variables and its return address.
Microsoft says the driver wrote past the end of a buffer or local variable in a way that would have overwritten that return address.
That would make the function jump to an arbitrary address when it finished.
Why Windows stops the PC
Microsoft calls this the classic buffer overrun attack.
It says the system was brought down to prevent a malicious user from gaining complete control of it.
The check is a safety stop, and it does not by itself mean that someone attacked your PC.
A faulty driver can trip the same check without any attacker involved.
What the parameters mean
The crash dump records four values that explain how the check failed.
| Parameter | Meaning |
|---|---|
| 1 | The actual security check cookie from the stack |
| 2 | The expected security check cookie |
| 3 | The bit-complement of the expected security check cookie |
| 4 | 0 |
Parameters 1 and 2 let a debugger compare the cookie found on the stack with the cookie Windows expected.
Start with the basics
Microsoft’s general blue screen guide asks you to note the stop code and any module name shown on the screen.
If you added new hardware before the errors began, shut down, remove it and restart.
Open Event Viewer and look in the system log, which Microsoft says may name the device or driver behind a stop code.
Make sure the drive has some room, because Microsoft suggests keeping about 10% to 15% free.
Install Windows and driver updates
Microsoft recommends automatic updates through Windows Update before manual driver downloads.
- Open Start, then Settings, then Windows Update.
- Select Check for updates.
- Install everything offered and restart the PC.
Microsoft’s stop error guide also says to install the latest cumulative updates and to update the BIOS and firmware.
Update, roll back or remove the driver
Device Manager is the main tool for replacing a driver that overruns its buffer.
| Goal | Steps in Device Manager |
|---|---|
| Update | Right-click the device, select Update driver, then search automatically |
| Manual update | Update driver, then Browse my computer for drivers, and pick the downloaded folder |
| Roll back | Right-click the device, open Properties, then the Driver tab, then Roll Back Driver |
| Reinstall | Right-click the device, select Uninstall device, confirm and restart |
Download manual drivers only from the manufacturer’s official site, and match your Windows version.
Our guide to updating graphics drivers in Windows 11 shows the same process for a display adapter.
Use Safe Mode when the PC crashes at startup
If Windows cannot stay up long enough to change a driver, use Startup Settings.
- Open Settings, then System, then Recovery.
- Select Restart now next to Advanced startup.
- Choose Troubleshoot, then Advanced options, then Startup Settings, then Restart.
- Press 4 or F4 for Safe Mode, or 5 or F5 for Safe Mode with Networking.
Once in Safe Mode, update, roll back or disable the suspect driver in Device Manager.
Repair Windows files
Damaged system files can also disturb drivers, so run Microsoft’s two repair commands.
- Open Command Prompt as administrator.
- Run
DISM.exe /Online /Cleanup-image /Restorehealth. - Run
sfc /scannowand wait for 100%.
Microsoft also suggests running Microsoft Safety Scanner or another antivirus scan, which is sensible given the attack wording above.
Find the driver in the crash dump
Microsoft’s resolution for this code is to get a stack trace with the kb command in the debugger.
The last routine on the stack before the buffer overrun handlers and the bug check call is the one that overran its local variable.
To try this, set Windows to write an automatic memory dump from Advanced system settings, then Settings under Startup and Recovery.
Open the dump on another PC in WinDbg and run !analyze -v.
Read the STACK_TEXT section for the .sys file closest to the failure.
Small dumps are saved in %SystemRoot%\Minidump, and larger ones in %SystemRoot%\MEMORY.DMP.
Test drivers with Driver Verifier
Microsoft describes Driver Verifier as a tool that isolates drivers in a special memory pool and validates their parameters.
It says to test suspicious drivers first, such as ones you updated recently.
If crashes stay unexplained, it says to verify all third-party and unsigned drivers, in groups of 10 to 20 at a time.
Microsoft warns that it uses a lot of CPU and can cause extra crashes and dump files.
Because it does not run in Safe Mode, you can use Safe Mode to switch it off if Windows will not reach the desktop.
Restore or reset Windows
If a recent change started the crashes, a restore point is Microsoft’s suggested route.
You can also uninstall a recent update, use Reset this PC and choose to keep your files, or reinstall from installation media.
Back up first, and keep your BitLocker recovery key handy.
When to contact support
If the stack points to a driver from a device maker, send that maker the dump and the stop code.
Microsoft says to contact the hardware vendor for diagnostics when hardware tests are needed.
What to collect before you ask for help
| Item | Where to find it |
|---|---|
| Stop code and module name | Bottom of the blue screen |
| Dump file | %SystemRoot%\Minidump or %SystemRoot%\MEMORY.DMP |
| Driver in the stack | STACK_TEXT after running !analyze -v |
| Related errors | System log in Event Viewer |
Sources and related guides
- Microsoft Learn: Bug Check 0xF7 DRIVER_OVERRAN_STACK_BUFFER
- Microsoft Learn: advanced troubleshooting for stop errors
- Microsoft Support: resolving blue screen errors
- Microsoft Support: update drivers through Device Manager
- Our guide to blue screens on Windows 11
- KERNEL_SECURITY_CHECK_FAILURE fix
More driver and PC software guides
- DRIVER_POWER_STATE_FAILURE Blue Screen Fix In Windows 11 (2026)
- How To Uninstall Driver Easy And Stop Auto-Renewal (2026)
- How To Delete An Old Driver Completely In Windows 11 (2026)
- How To Install A NETGEAR WiFi USB Adapter Driver (2026)
- How To Install A TP-Link USB Wi-Fi Adapter Driver (2026)
- How To Install The Samsung NVMe Driver On Windows (2026)