Skip to content

cmos_rtc: Fix overflow found by fuzzer#3198

Merged
smalis-msft merged 2 commits intomicrosoft:mainfrom
smalis-msft:cmos-fix
Apr 7, 2026
Merged

cmos_rtc: Fix overflow found by fuzzer#3198
smalis-msft merged 2 commits intomicrosoft:mainfrom
smalis-msft:cmos-fix

Conversation

@smalis-msft
Copy link
Copy Markdown
Contributor

@smalis-msft smalis-msft commented Apr 6, 2026

Fix an overflow found by the fuzzer where extremely large times (year 9999) would hit this unwrap. Just fold it into the existing error handling instead.

@smalis-msft smalis-msft requested a review from a team as a code owner April 6, 2026 15:13
Copilot AI review requested due to automatic review settings April 6, 2026 15:13
@smalis-msft smalis-msft enabled auto-merge (squash) April 6, 2026 15:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a panic/overflow in the CMOS RTC device when converting extreme guest-programmed RTC register values into a UTC timestamp, folding the failure into existing error handling.

Changes:

  • Replace a fallible to_zoned(UTC).unwrap() conversion with Result-based propagation.
  • Continue using existing ratelimited warning + early return when RTC register contents are invalid/unrepresentable.

@smalis-msft smalis-msft merged commit 895b702 into microsoft:main Apr 7, 2026
61 checks passed
@smalis-msft smalis-msft deleted the cmos-fix branch April 7, 2026 16:00
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