~ / topics / Data & Protocols
$man file-formats-and-protocols

File Formats and Protocols

In brief: Archive files, images, executables, certificates and network messages often contain a date written into a fixed-size slot. If that slot holds a 32-bit count of seconds since 1970, it runs out in 2038 (if the number is "signed") or 2106 (if "unsigned"). Some formats were designed with room to spare; others were patched with extension fields. Even where the format is fine, a program that copies the date into a 32-bit variable will still break, so both the format and the code that reads it matter.

Risk level Medium
Status Most formats have a 2038-safe variant (pax tar, ZIP NTFS extra field, GeneralizedTime); several widely used fields are 32-bit unsigned and expire in 2106; reader/writer code on 32-bit time_t remains the main 2038 risk
Last reviewed 2026-10-21

2038 status at a glance

  • At risk ConfirmedIEC 61850 Edition 1 (substation automation)SecondSinceEpoch is a signed 32-bit INT32 in Edition 1.Do: Move to Edition 2, which uses unsigned INT32U and reaches 2106.
  • At risk Confirmedcpio old binary formatThis format uses a 32-bit mtime, ending in 2038 or 2106 depending on signedness.Do: Use newc, odc or pax formats.
  • At risk ConfirmedZIP extended-timestamp field (0x5455)This field uses 4-byte signed Unix times.Do: Write the NTFS extra field (0x000a), which has 64-bit times.
  • Dependscpio newc (initramfs), MIT krb5 API timestampsThese are 32-bit fields. They are fine to 2106 when read as unsigned, but break in 2038 if code treats them as signed.Do: Check readers treat the field as unsigned. For krb5, cast with (time_t)(uint32_t) as MIT documents.
  • DependsDNSSEC signatures and JWT tokensDNSSEC uses uint32 with serial arithmetic (a ±68-year window), and JWT numbers are bounded only by the parser.Do: Use RFC 1982 comparisons and 64-bit parsing.
Not affected or different deadline (3), and why

Overview

Formats and protocols outlive the systems that create them. A tar archive written today may be restored in 2050; a certificate issued today may be valid until 2045; a protocol frozen in the 1990s is still on the wire. Three questions decide the risk for each format:

  1. Width and signedness of the field: signed 32-bit → 2038-01-19 03:14:07 UTC; unsigned 32-bit → 2106-02-07 06:28:15 UTC; 33-bit (11 octal digits) → 2242.
  2. Whether the specification defines a wider alternative (pax headers, GeneralizedTime, the ZIP NTFS extra field).
  3. How implementations convert the field. A 2106-safe unsigned field read into a signed 32-bit time_t fails in 2038, and a 64-bit format field written by software that clamps to 32 bits is effectively 2038-limited.

The ITU-T 2038-class technical paper notes that protocol failures range from "fixed-width timestamp fields in networking protocol definitions, to variable-length encoding systems that have maximum-length constraints", and that resilient systems "must expect that external systems may transmit non-conformant temporal values" [1].

Technical details

Archive and compression formats

Images and executables

Security protocols

Time and management protocols

Affected versions / products

Format / protocol Field Width / encoding Overflow Fix / safe variant
tar ustar mtime 12-byte octal (< 2^33) 2242 [2] pax (--format=posix) [2]
tar pax mtime= record Decimal text, unbounded None [2] —
cpio old binary c_mtime 32-bit integer 2038 or 2106 (signedness) [3] newc/odc or pax
cpio odc c_mtime 11-char octal 2242 [3] —
cpio newc (initramfs) c_mtime 8-char hex = 32-bit 2106 unsigned / 2038 signed [3] Ensure readers treat as unsigned
ZIP core header DOS date/time 7-bit year from 1980 2107-12-31 [4] Add NTFS extra field
ZIP 0x5455 extended timestamp mtime/atime/ctime 32-bit signed 2038-01-19 [5] 0x000a NTFS field
ZIP 0x000a NTFS mtime/atime/ctime 64-bit, 100 ns since 1601 ~30828 [5] —
gzip MTIME 4 bytes, Unix seconds 2106 (unsigned) [6] — (0 = none)
PNG tIME 2-byte year 65535 [7] —
ELF — no timestamp n/a [8] —
PE/COFF TimeDateStamp low 32 bits of time_t 2106 wrap [9] Treat as opaque / unsigned
X.509 notBefore/notAfter UTCTime ≤ 2049; GeneralizedTime ≥ 2050 9999 [10] 64-bit time_t in validators
Kerberos (wire) KerberosTime GeneralizedTime 9999 [11] —
MIT krb5 API krb5_timestamp signed 32-bit 2038; 2106 via uint32_t cast [12] Cast as documented
TLS 1.2 gmt_unix_time uint32 2106 (no correctness requirement) [13] TLS 1.3 random [14]
DNSSEC RRSIG inception/expiration uint32 + serial arithmetic Wraps every ~136 years; ±68-year window [15] Correct RFC 1982 comparison
JWT exp/nbf/iat JSON number None (implementation-bound) [16] 64-bit parsing
NTP timestamp seconds uint32 since 1900 2036-02-07 NTP-Era-2036
SNMP sysUpTime / DateAndTime 32-bit ticks / 2-octet year ~497-day wrap / 65536 [17] Handle wrap
IEC 61850 SecondSinceEpoch INT32 (Ed. 1) / INT32U (Ed. 2) 2038 / 2106 [18] Edition 2
DNP3 absolute time UTC ms since 1970 Far future [19] —

Risk & compliance notes

Detection & mitigation

See also

References

  1. ITU-T Technical Paper XSTP.EPOCH, "Global coordination requirements for 2038-class rollover events" (liaison to IETF), 2026-07-21 — protocol-layer failure patterns.
  2. GNU tar manual: Controlling the Archive Format — GNU — ustar 2^33 limit; GNU and pax formats.
  3. cpio(5) — FreeBSD Manual Pages (libarchive) — old binary, odc and newc field widths.
  4. fs/fat/misc.c — Android common kernel (Linux FAT driver) — DOS date format: 7-bit year from 1980, max 2107.
  5. Info-ZIP extra field specification — libzip — 0x5455, 0x5855, 0x000a field definitions.
  6. RFC 1952, GZIP file format specification 4.3 — IETF, 1996 — MTIME definition.
  7. PNG Specification 1.2, Chunk Specifications — libpng.org — tIME 2-byte year.
  8. elf(5) — Linux manual page, man7.org — ELF header fields (no timestamp).
  9. PE Format — Microsoft Learn — COFF TimeDateStamp, 0/0xFFFFFFFF, IMAGE_DEBUG_TYPE_REPRO.
  10. RFC 5280 §4.1.2.5 Validity — IETF, 2008 — UTCTime/GeneralizedTime and 2050 rule.
  11. RFC 4120 §5.2.3 KerberosTime — IETF, 2005 — KerberosTime ::= GeneralizedTime.
  12. Year 2038 considerations for uses of krb5_timestamp — MIT Kerberos 1.21 docs — signed 32-bit krb5_timestamp; uint32_t cast to 2106; GSSAPI 1.16+.
  13. RFC 5246 §7.4.1.2 — IETF, 2008 — TLS 1.2 gmt_unix_time.
  14. RFC 8446 §4.1.2 — IETF, 2018 — TLS 1.3 random.
  15. RFC 4034 §3.1.5 — IETF, 2005 — RRSIG times, serial number arithmetic, 68/136 years.
  16. RFC 7519 §2 Terminology (NumericDate) — IETF, 2015 — JWT time claims.
  17. RFC 2579, Textual Conventions for SMIv2 — IETF, 1999 — DateAndTime and TimeStamp wrap.
  18. Karlheinz Schwarz, "IEC 61850 timestamp to overflow in 2038" — NettedAutomation blog, 2010-11-21 — Ed. 1 INT32 vs Ed. 2 INT32U.
  19. DNP3 driver documentation — Inductive Automation Ignition 8.3 — DNP3TIME, UTC ms since 1970.