The point of current / worst attributes like temperature is exactly this: to tell you if the drive has ever been outside its max operating temperature, and thus might have suffered permanent damage.
That's why it says "failed in the past", not "failing now": you did just barely touch the max-temp threshold. Note the attribute display shows "normalized: 50, threshold: 45, worst: 45". (These are 0..200 normalized values like for any other attribute, not raw Celsius temps.)
You also have some bad sectors (uncorrectable sector errors), so whether the brief high temperature caused that or not, it's probably time to ditch that drive.
A better SMART software UI would show you the current and max-ever temp. e.g.
smartctl -a /dev/sda or
smartctl -x /dev/sda (
-x prints all available SMART and non-SMART data it can get from the drive, including a temperature history log if the drive has one, with an ASCII bar graph.)
smartctl -x includes this for an old WD Green 1TB (WD10EADS) hard drive:
Current Temperature: 36 Celsius
Power Cycle Min/Max Temperature: 25/42 Celsius
Lifetime Min/Max Temperature: 35/46 Celsius
The software you're using looks like it's only showing the current temp, which is slightly below the threshold, but it's not going to hide the fact that the drive was out-of-spec at some point in the past.
You could certainly justify ignoring that momentary high-temperature, if you really did correct it in minutes. But you won't (or shouldn't) ever be able to make the drive itself lie about the fact that it was over its rated max temp for some time, and thus the attribute did fail in the past.
You can configure
smartd to ignore any given attribute so you can still get a useful notification if anything else crosses a threshold into officially-failing territory.:
-i ID [ATA only] Ignore device Attribute number ID when checking for failure of Usage Attributes. ID must be a decimal
integer in the range
from 1 to 255. This Directive modifies the behavior of the '-f' Directive and has no effect without it.
This is useful, for example, if you have a very old disk and don't want to keep getting messages about the
(usually Attribute 9) failing. This Directive may appear multiple times for a single device, if you want to ignore
Extended temperature-history attributes
I just got a new 6TB Seagate Barracuda (ST6000DM003-2CY186 firmware 0001, a 5425 RPM drive), which has some interesting stats, including time spent exceeding min/max operating points, and high/low of short-term and log-term temps.
SCT Status Version: 3
SCT Version (vendor specific): 522 (0x020a)
Device State: Active (0)
Current Temperature: 33 Celsius
Power Cycle Min/Max Temperature: 27/33 Celsius
Lifetime Min/Max Temperature: 27/33 Celsius
Under/Over Temperature Limit Count: 0/0
SCT Temperature History Version: 2
Temperature Sampling Period: 3 minutes
Temperature Logging Interval: 59 minutes
Min/Max recommended Temperature: 14/55 Celsius
Min/Max Temperature Limit: 10/60 Celsius
Temperature History Size (Index): 128 (2)
And in the full-detail section:
0x05 ===== = = === == Temperature Statistics (rev 1) ==
0x05 0x008 1 33 --- Current Temperature
0x05 0x010 1 - --- Average Short Term Temperature
0x05 0x018 1 - --- Average Long Term Temperature
0x05 0x020 1 33 --- Highest Temperature
0x05 0x028 1 30 --- Lowest Temperature
0x05 0x030 1 - --- Highest Average Short Term Temperature
0x05 0x038 1 - --- Lowest Average Short Term Temperature
0x05 0x040 1 - --- Highest Average Long Term Temperature
0x05 0x048 1 - --- Lowest Average Long Term Temperature
0x05 0x050 4 0 --- Time in Over-Temperature
0x05 0x058 1 55 --- Specified Maximum Operating Temperature
0x05 0x060 4 0 --- Time in Under-Temperature
0x05 0x068 1 13 --- Specified Minimum Operating Temperature
(The drive has only been powered on for a couple minutes; that's presumably why there's a
- for no data in some of the fields.)
If you drive has these extended attributes, you can show someone that the time spent outside of allowed temp was very short (if that's the case). Presumably if you were going to modify the SMART data, you'd just have done that and removed any mention of it being out-of-range ever, but obviously you can't 100% trust any data from a 2nd-hand drive that someone's trying to sell you.
See https://superuser.com/questions/1389522/what-does-it-mean-when-my-new-hdd-reports-errors-at-a-time-that-shouldnt-exist for more about used drives with "odometer rollback" on their "Power_On_Hours" attribute for example.