Overview
| Artifact ID: | 41d5880456f0617adcd681cdaa96dd74463a6a160364246695f0e5451348b044 |
|---|---|
| Ticket: | 813699148d19177469c94023f3dc739cbd2d9f8d
Heap out-of-bounds read and NULL dereference in `clock` on malformed `TZData` |
| User & Date: | serhiy.storchaka on 2026-11-05 19:07:06 |
Changes
- icomment:
Reviewed [01cd1ca85c]. With ASan and UBSan, the three PoCs and the safe-interp one now give "malformed time zone data", and clock.test passes. One case is still open: the :GMT shortcut in TclConvertUTCToLocal() reads the first row without checking rowc, and does not check that element 3 exists. After "set ::tcl::clock::TZData(:GMT) {}" the next "clock format 0 -gmt 1" crashes in Tcl_ListObjIndex(); with a 3-element row the name is NULL and %Z crashes on it. Only trusted scripts can reach it. Minor: the changes.md link has a stray opening bracket (fixed in [e8180fc66e]), and clock-72.0..72.2 leave TZData(:bad) behind. 9.0 and 8.6 need the checks too. This does not cover the other half of the report: on trunk the ::tcl::clock::* helpers, including getenv, are still visible in safe interps. - login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"