be more careful about integer type sizes in nsSiteSecurityService
Categories
(Core :: Security: PSM, defect, P2)
Tracking
()
People
(Reporter: keeler, Unassigned)
Details
(Whiteboard: [psm-backlog])
There's at least one unsound integer type conversion in nsSiteSecurityService (parsing max-age out of HSTS headers). This shouldn't be a security issue because we only accept HSTS headers from sites that have a valid certificate (and if a site wanted to disable HSTS for itself, it could just send a header with "max-age=0"), but we should still make sure we're making sound conversions (or not converting, if we don't need to).
Comment 1•7 years ago
|
||
Due to possible wrap around (arithmetic overflow) when converting seconds->milliseconds the max-age actually used is the value provided modulo UINT64_MAX/1000 (18,446,744,073,709 seconds = 584,942 years).
If a site provides a very large max-age (larger than this value), the issue is that the HSTS entry may unexpectedly time out after a very short time instead.
It is a minor issue, in an unlikely scenario.
| Reporter | ||
Updated•6 years ago
|
Description
•