Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <APIASwCZLIHX-HvaBIn*TKoJ.1.1795628604523.Hmail.2601110895@stu.pku.edu.cn>
Date: Thu, 26 Nov 2026 01:43:24 +0800 (GMT+08:00)
From: 吴尚哲 <wushangzhe26@....pku.edu.cn>
To: musl  <musl@...ts.openwall.com>
Subject: Bug in TZ rule handling: out-of-bounds read for an invalid month

Hello,
We found a bug in musl 1.2.5 on x86_64: when the month in an
Mm.n.d daylight-saving rule is out of range, localtime_r() can
read outside the bounds of a month lookup table.


In src/time/__tz.c:347, rule_to_secs() calls:
    t += __month_to_secs(m-1, is_leap);


Because m is not checked against the valid range of 1 through 12,
m-1 can be outside the bounds of the 12-element table that
__month_to_secs() indexes in src/time/__month_to_secs.c.


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.