Page MenuHomeFreeBSD

tzcode: Don't treat TZDEFAULT as tainted
ClosedPublic

Authored by des on Aug 29 2025, 4:09 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 24, 1:49 AM
Unknown Object (File)
Mon, Nov 24, 1:42 AM
Unknown Object (File)
Mon, Nov 24, 1:42 AM
Unknown Object (File)
Mon, Nov 24, 1:40 AM
Unknown Object (File)
Sat, Nov 22, 6:32 AM
Unknown Object (File)
Tue, Nov 18, 12:07 AM
Unknown Object (File)
Thu, Nov 6, 8:46 AM
Unknown Object (File)
Sun, Nov 2, 5:19 AM
Subscribers

Details

Summary

tzset() calls zoneinit() with the FROMENV flag set unconditionally, so
if TZ is unset and we use TZDEFAULT instead, we were still treating it
as if it came from the environment. Unset the FROMENV flag if name is
null and we switch to TZDEFAULT, or if, after skipping the optional
leading colon, we find that name is identical to TZDEFAULT.

This incorporates upstream change d0e0b00f846c ("Avoid unnecessary
access, stat calls").

Fixes: b6ea2513f776 ("tzcode: Limit TZ for setugid programs")
Event: Oslo Hackathon 202508

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66640
Build 63523: arc lint + arc unit

Event Timeline

des requested review of this revision.Aug 29 2025, 4:09 PM

This looks good. Thank you!

This revision is now accepted and ready to land.Aug 30 2025, 3:09 AM
des retitled this revision from tzcode: Don't set FROMENV flag unconditionally to tzcode: Don't treat TZDEFAULT as tainted.Aug 31 2025, 10:55 AM
des edited the summary of this revision. (Show Details)
des edited the summary of this revision. (Show Details)

redo after upstream fix

This revision now requires review to proceed.Aug 31 2025, 10:55 AM

This is good. And it passes the test in D52241.

This revision is now accepted and ready to land.Sep 1 2025, 12:29 AM
This revision was automatically updated to reflect the committed changes.