|
|
Message-ID: <AIcAEgBNLDXXG1tZBWcQJaoN.1.1795629007664.Hmail.2601110895@stu.pku.edu.cn>
Date: Thu, 26 Nov 2026 01:50:07 +0800 (GMT+08:00)
From: 吴尚哲 <wushangzhe26@....pku.edu.cn>
To: musl <musl@...ts.openwall.com>
Subject: Bug in getoff(): signed overflow when converting TZ hours to seconds
Hello,
We found a bug in musl 1.2.5 on x86_64: an out-of-range hour
field in a TZ offset can cause signed integer overflow in
tzset().
In src/time/__tz.c:58, getoff() converts the hour field to
seconds:
int off = 3600*getint(p);
Because getint() returns int, the multiplication is evaluated
as signed int. There is no range check before the multiplication,
so the result can exceed INT_MAX.
Thanks.
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.