Skip to content

Instantly share code, notes, and snippets.

@rhymeswithmogul
Last active May 12, 2021 13:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhymeswithmogul/5a5d919388458a5e0a12e8ac6a4ffdf8 to your computer and use it in GitHub Desktop.
Save rhymeswithmogul/5a5d919388458a5e0a12e8ac6a4ffdf8 to your computer and use it in GitHub Desktop.
Check your HPE SSD's for the 32,768-hour time bomb and the 40,000-hour time bomb.
<#
.NOTES
Find-SSDTimeBombs.ps1, version 1.0.1
Copyright (c) 2020 Colin Cogle <colin@colincogle.name>.
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see <https://www.gnu.org/licenses/>.
.SYNOPSIS
Check the local computer for HPE and Dell SSD time bombs.
.DESCRIPTION
In November 2019, HPE announced that some of its SAS SSD's had firmware bug that
would cause the SSD to brick itself after being powered on for exactly 32,768
hours.
Later, in March 2020, HPE and Dell both announced that some of their SAS SSD's
made by SanDisk and Western Digital contained another time bomb in the firmware
where the device would brick itself after being powered on for exactly 40,000
hours.
This script detects if the local computer has one of these flawed SSD's, and if
so, it checks to make sure the corrected firmware has been installed.
.EXAMPLE
PS C:\> .\Find-SSDTimeBombs.ps1
This example checks the local computer for these bad SSD's and checks their
firmware versions. No output means that everything is good.
.EXAMPLE
PS C:\> .\Find-SSDTimeBombs.ps1 -Verbose
VERBOSE: Found an HPE FOO1234 that has been patched against the 32,768 hours bug. No action is required.
VERBOSE: Found an HPE FOO5678 that has been patched against the 40,000 hours bug. No action is required.
Information about patched SSD's is written to the verbose stream.
.EXAMPLE
PS C:\> .\Find-SSDTimeBombs.ps1 -Verbose -Debug
DEBUG: Found a Seagate FOO90AB that is not affected by either bug.
Information about all disks in the system is written to the debug stream.
You can use both -Debug and -Verbose.
.INPUTS
This script does not take input.
.OUTPUTS
[System.Object[]]
Zero or more objects representing SSD's with faulty firmware.
.LINK
https://gist.github.com/rhymeswithmogul/5a5d919388458a5e0a12e8ac6a4ffdf8
.LINK
Get-PhysicalDisk
#>
#Requires -Version 3.0
#Requires -Module Storage
[CmdletBinding()]
Param()
# Get a list of bad SSD's to present to the user afterwards.
$FoundBadSSDs = @()
Get-PhysicalDisk | ForEach-Object {
#region 32,768 hour bug check
# These bad HPE SSD's fail after being powered on for 32,768 hours.
# Install the HPD8 firmware to avoid this. For more information, read the
# customer advisory:
# https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-a00092491en_us
If ($_.Model -in @(
"VO0480JFDGT",
"VO0960JFDGU",
"VO1920JFDGV",
"VO3840JFDHA",
"MO0400JFFCF",
"MO0800JFFCH",
"MO1600JFFCK",
"MO3200JFFCL",
"VO000480JWDAR",
"VO000960JWDAT",
"VO001920JWDAU",
"VO003840JWDAV",
"VO007680JWCNK",
"VO015300JWCNL",
"VK000960JWSSQ",
"VK001920JWSSR",
"VK003840JWSST",
"VK007680JWSSU",
"VO015300JWSSV"
))
{
If ($_.FirmwareVersion -ne "HPD8")
{
Write-Output "Found an HPE $($_.Model) that will fail at 32,768 hours!"
$FoundBadSSDs += [PSObject]$_
}
Else
{
Write-Verbose "Found an HPE $($_.Model) that has been patched against the 32,768 hours bug. No action is required."
}
}
#endregion
#region 40,000 hour bug check
# There's a second SSD time bomb that causes the drive to fail after it has
# been powered on for exactly 40,000 hours. This bug was fixed in HPE
# firmware version HPD7, and in Dell/SanDisk firmware version D417.
ElseIf ($_.Model -in @(
# These bad HPE SSD models can be found in Document ID a00097382en_us.
# https://support.hpe.com/hpesc/public/docDisplay?docLocale=en_US&docId=a00097382en_us
"EK0800JVYPN",
"EO1600JVYPP",
"MK0800JVYPQ",
"MO1600JVYPR",
# These bad Dell SSD models were taken from:
# https://www.guru3d.com/news-story/complete-ssd-failure-dell-and-hpe-release-firmware-against-40k-hour-bug.html
"LT0200MO",
"LT0400MO",
"LT0800MO",
"LT1600MO",
"LT0200WM",
"LT0400WM"
))
{
If ($_.FirmwareVersion -ne "HPD7" -and $_.FirmwareVersion -NotMatch "D417")
{
Write-Output "Found a $($_.Manufacturer) $($_.Model) that will fail at 40,000 hours!"
$FoundBadSSDs += [PSObject]$_
}
Else
{
Write-Verbose "Found an HPE $($_.Model) that has been patched against the 40,000 hours bug. No action is required."
}
}
#endregion
#region Show information for all disks.
Else
{
Write-Debug "Found a(n) $($_.Manufacturer) $($_.Model) that is not affected by either bug."
}
#endregion
}
Return $FoundBadSSDs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment