timedatectl list-timezones shows timezones that are not installed
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| systemd (Ubuntu) |
Fix Released
|
Medium
|
Nick Rosbrook | ||
| Noble |
Fix Released
|
Medium
|
Nick Rosbrook | ||
| Plucky |
Won't Fix
|
Medium
|
Unassigned | ||
Bug Description
[Impact]
The org.freedesktop
To build the list, systemd-timedated parses /usr/share/
But, systemd-timedated does not validate the timezones when building the list, which makes the following possible:
$ timedatectl list-timezones | grep "US/Alaska"
US/Alaska
$ timedatectl set-timezone US/Alaska
Failed to set time zone: Invalid or not installed time zone 'US/Alaska'
[Test Plan]
Select a timezone from the tzdata-legacy package, e.g. US/Alaska.
Confirm that /usr/share/
$ stat /usr/share/
$ apt policy tzdata-legacy
Check if US/Alaska is included the the list from systemd-timedated:
$ timedatectl list-timezones | grep "US/Alaska"
With the fix, US/Alaska should not be listed. But, after installing tzdata-legacy, US/Alaska should be installed.
$ apt install tzdata-legacy
$ timedatectl list-timezones | grep "US/Alaska"
[Where problems could occur]
The patch uses an existing timezone_is_valid() function to validate timezones before returning a list in get_timezones(). In addition to systemd-timedated, get_timezones() is used in systemd-firstboot.
If external programs depend on the current buggy behavior, this fix could cause a regression.
Note that the org.freedesktop
| Changed in systemd (Ubuntu): | |
| importance: | Undecided → Medium |
| Changed in systemd (Ubuntu Noble): | |
| importance: | Undecided → Medium |
| Changed in systemd (Ubuntu Plucky): | |
| importance: | Undecided → Medium |
| Changed in systemd (Ubuntu Noble): | |
| status: | Triaged → In Progress |

This bug was fixed in the package systemd - 257.9-0ubuntu2
---------------
systemd (257.9-0ubuntu2) questing; urgency=medium
* basic: validate timezones in get_timezones() (LP: #2125405) libnss- systemd. nss: install after 'compat' too (LP: #2125403) and-services: use coreutils tunable in apparmor test (LP: #2125614)
* debian/
* d/t/boot-
* d/t/upstream: use GNU cp in test setup (LP: #2122363)
-- Nick Rosbrook <email address hidden> Thu, 25 Sep 2025 12:45:39 -0400