RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1503942 - timedatectl crashes if the length of the day name in the current locale is long
Summary: timedatectl crashes if the length of the day name in the current locale is long
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Synacek
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On: 1503452
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-19 07:03 UTC by Jan Synacek
Modified: 2018-04-10 11:25 UTC (History)
4 users (show)

Fixed In Version: systemd-219-47.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1503452
Environment:
Last Closed: 2018-04-10 11:24:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0711 0 None None None 2018-04-10 11:25:16 UTC

Description Jan Synacek 2017-10-19 07:03:18 UTC
+++ This bug was initially created as a clone of Bug #1503452 +++

Description of problem:
Crash in the last command:


% export LANG=en_US.UTF-8
[hedayat@hv ~]% date
Wed Oct 18 10:54:07 +0330 2017
[hedayat@hv ~]% timedatectl
      Local time: Wed 2017-10-18 11:24:10 +0400
  Universal time: Wed 2017-10-18 07:24:10 UTC
        RTC time: Wed 2017-10-18 07:24:10
       Time zone: Asia/Folan (+0400, +0400)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no
[hedayat@hv ~]% 
[hedayat@hv ~]% export LANG=fa_IR.UTF-8
[hedayat@hv ~]% date
چهارشنبه ۱۸ اكتبر ۱۷، ساعت ۱۰:۵۴:۲۴ (+0330)
[hedayat@hv ~]% timedatectl            
Assertion 'xstrftime: a[] must be big enough' failed at ../src/timedate/timedatectl.c:105, function print_status_info(). Aborting.
zsh: abort (core dumped)  timedatectl


Version-Release number of selected component (if applicable):
systemd-234-8.fc27.x86_64

How reproducible:
Depends on the current day of week. Happens on Wednesdays & Thursdays in fa_IR locale

--- Additional comment from Jan Synacek on 2017-10-18 09:41:44 CEST ---

src/basic/time-util.h:75:#define FORMAT_TIMESTAMP_MAX (3+1+10+1+8+1+6+1+6+1)
src/timedate/timedatectl.c:75:        char a[FORMAT_TIMESTAMP_MAX];
src/timedate/timedatectl.c:105                 xstrftime(a, "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm));

It seems that the maximum format length assumption only holds for non-wide/variable encoded characters.

--- Additional comment from Zbigniew Jędrzejewski-Szmek on 2017-10-18 16:32:23 CEST ---

https://github.com/systemd/systemd/pull/7123

Comment 1 Jan Synacek 2017-10-19 08:01:03 UTC
Note that using the same reproducer as in the original bug report didn't reproduce the problem for me. It should be fixed anyway, as the assumption in the code is simply wrong.

Comment 2 Jan Synacek 2017-10-24 12:49:00 UTC
https://github.com/lnykryn/systemd-rhel/pull/165

Comment 4 Lukáš Nykrýn 2017-11-13 14:20:17 UTC
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/165 -> post

Comment 10 errata-xmlrpc 2018-04-10 11:24:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0711


Note You need to log in before you can comment on or make changes to this bug.