racequite opened PR #14060 from racequite:fix/cache-duration-overflow to bytecodealliance:main:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->The cache configuration duration deserializer uses unchecked multiplication when converting minutes, hours, and days to seconds. Oversized values therefore panic when overflow checks are enabled and wrap otherwise. For example,
307445734561825861mwraps to 44 seconds in a release build and is then accepted by configuration validation.Use
u64::checked_mulfor the affected units so overflow is reported through the existing invalid-configuration path. Add regression coverage for the first overflowing minute, hour, and day values.
racequite requested wasmtime-core-reviewers for a review on PR #14060.
racequite requested dicej for a review on PR #14060.
:thumbs_up: alexcrichton submitted PR review.
alexcrichton added PR #14060 wasmtime-cache: Reject overflowing duration values to the merge queue.
:check: alexcrichton merged PR #14060.
alexcrichton removed PR #14060 wasmtime-cache: Reject overflowing duration values from the merge queue.
Last updated: Aug 30 2026 at 09:07 UTC