Skip to content

Enforce TZ_MAX_TYPES limit and use size_t for iteration in TimeZoneInfo::Load() to avoid wrap-around at 256#346

Merged
mkruskal-google merged 1 commit into
google:masterfrom
higher-performance:tzif-parser-wraparound
Jul 11, 2026
Merged

Enforce TZ_MAX_TYPES limit and use size_t for iteration in TimeZoneInfo::Load() to avoid wrap-around at 256#346
mkruskal-google merged 1 commit into
google:masterfrom
higher-performance:tzif-parser-wraparound

Conversation

@higher-performance

Copy link
Copy Markdown
Collaborator

Otherwise there is a potential denial-of-service vulnerability using a crafted zoneinfo file that has 256 or more transition types that are all marked as DST.

@mkruskal-google mkruskal-google self-assigned this Jul 10, 2026
@mkruskal-google mkruskal-google self-requested a review July 10, 2026 23:45
Comment thread src/time_zone_info.cc Outdated
Comment thread src/time_zone_info.cc
@mkruskal-google mkruskal-google self-requested a review July 10, 2026 23:47
@higher-performance

Copy link
Copy Markdown
Collaborator Author

Actually it seems I might not have merge permissions at all. Do you want to merge, or give me permissions?

Comment thread src/time_zone_info.cc Outdated
…::Load() from uint8_fast_t to size_t to avoid wrap-around at 256

Otherwise there is a potential denial-of-service vulnerability using a crafted zoneinfo file that has 256 or more transition types that are all marked as DST.
@mkruskal-google mkruskal-google merged commit facc589 into google:master Jul 11, 2026
13 checks passed
Comment thread src/time_zone_info.cc
@higher-performance higher-performance deleted the tzif-parser-wraparound branch July 11, 2026 03:30
mkruskal-google pushed a commit that referenced this pull request Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants