Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Wednesday January 22 2020, @05:18PM   Printer-friendly
from the here-we-go-again dept.

Steven Bellovin, Professor of Computer Science at Columbia University writes briefly with a concrete example of how the Y2038 threat works.

[...] just as with Y2K, the problems don't start when the magic date hits; rather, they start when a computer first encounters dates after the rollover point, and that can be a lot earlier. In fact, I just had such an experience.

A colleague sent me a file from his Windows machine; looking at the contents, I saw this.

$ unzip -l zipfile.zip
Archive: zipfile.zip
Length Date Time Name
——— ——— ———
2411339 01-01-2103 00:00 Anatomy...
——— ———

Look at that date: it's in the next century! (No, I don't know how that happened.) But when I looked at it after extracting on my [MacOS] computer, the date was well in the past:

$ ls -l Anatomy...
-rw-r-r-@ 1 smb staff 2411339 Nov 24 1966 Anatomy...

Huh?

After a quick bit of coding, I found that the on-disk modification time of the extracted file was 4,197,067,200 seconds since the Epoch. That's larger than the limit! But it's worse than that. I translated the number to hexadecimal (base 16), which computer programmers use as an easy way to display the binary values that computers use internally. It came to FA2A29C0. (Since base 16 needs six more digits than our customary base 10, we use the letters A–F to represent them.) The first "F", in binary, is 1111. And the first of those bits is the so-called sign bit, the bit that tells whether or not the number is negative. The value of FA2A29C0, if treated as a signed, 32-bit number, is -97,900,096, or about 3.1 years before the Epoch. Yup, that corresponds exactly to the November 24, 1966 date my system displayed. (Why should +4,197,067,200 come out to -97,900,096? As I indicated, that's moderately technical, but if you want to learn the gory details, the magic search phrase is "2's complement".)

While attention is paid to desktops and servers, they are easy to replace and have very short lifetimes. In contrast embedded systems should be receiving special action already since they are seldomly or never updated and have lifespans measured in decades.

Previously:
Reducing Year 2038 Problems in curl (2018)
The Time Is... 1500000000 (2017)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by chuckugly on Wednesday January 22 2020, @06:43PM (3 children)

    by chuckugly (2910) on Wednesday January 22 2020, @06:43PM (#946931)

    When everyone was in a panic about Y2K I told anyone who asked that it was 2038 we needed to think about, Y2K was not a big deal. With 18 years to go and people being aware of it now I don't expect 2038 to be a big deal but I expect a few old gizmos to break in entertaining ways.

  • (Score: 2) by DannyB on Wednesday January 22 2020, @07:26PM (1 child)

    by DannyB (5839) Subscriber Badge on Wednesday January 22 2020, @07:26PM (#946965) Journal

    I don't expect 2038 to be a big deal but I expect a few old gizmos to break in entertaining ways.

    Old gizmos maybe. But if those old gizmos had been IoT gizmos, then there would be nothing to worry about based on my observations of the high standards of quality and reliability present in IoT firmware.

    --
    To transfer files: right-click on file, pick Copy. Unplug mouse, plug mouse into other computer. Right-click, paste.
    • (Score: 0) by Anonymous Coward on Thursday January 23 2020, @04:00PM

      by Anonymous Coward on Thursday January 23 2020, @04:00PM (#947470)

      There will never be anything to worry about with "old IoT gizmos", because the cloud servers they rely on will be shut down to force consumption of new gizmos long before the gizmos get "old".

  • (Score: 2) by driverless on Friday January 24 2020, @02:35PM

    by driverless (4770) on Friday January 24 2020, @02:35PM (#947939)

    There was a vast amount of stuff in 2000 that wasn't affected because it didn't use decimal dates, in particular SCADA and embedded.

    This is the exact stuff that uses 32-bit time fields that end in 2038.