#1151045 /usr/bin/ipmitool: sel get / sel elist -v print date or time twice in Timestamp line (fixed upstream)

Package:
ipmitool
Source:
ipmitool
Description:
utility for IPMI control with kernel driver or LAN interface (daemon)
Submitter:
Arun S
Date:
2026-10-16 12:17:03 UTC
Severity:
normal
Tags:
#1151045#5
Date:
2026-10-16 12:06:38 UTC
From:
To:
Dear Maintainer,

In verbose SEL output (sel get, sel elist -v) the Timestamp field shows the
same value twice instead of "<date> <time>".

Steps:
$ ipmitool -I lanplus -H <bmc> -U <user> -E -L USER sel get 0x0018 |
grep Timestamp
Timestamp : 19:22:05 UTC 19:22:05 UTC

$ ipmitool -I lanplus -H <bmc> -U <user> -E -L USER -v sel elist |
grep -m3 Timestamp
Timestamp : 21:15:31 UTC 21:15:31 UTC
Timestamp : 12:04:50 UTC 12:04:50 UTC
Timestamp : 12:05:06 UTC 12:05:06 UTC

Expected:
Timestamp : MM/DD/YY HH:MM:SS UTC (date followed by time)

"sel elist" and "-c sel elist" print the correct date and time.

Cause: ipmi_timestamp_date() and ipmi_timestamp_time() return the same static
buffer (ipmi_timestamp_fmt() in lib/ipmi_time.c). lib/ipmi_sel.c called both
inside one printf(), so only the last-evaluated result survives. Which one
survives depends on the compiler's argument evaluation order, so the symptom
differs between builds (date twice on some, time twice on others).

Fixed upstream on master: commit 01c572b911035726526b9bfe685031f2bf925130
(sel: Fix date/time output of timestamps for 'sel get'),
https://codeberg.org/IPMITool/ipmitool/commit/01c572b911035726526b9bfe685031f2bf925130
where the two calls are in separate printf() statements. Upstream has not
tagged a release since 1.8.19 (2022-09-01).

The problem was introduced upstream in f0d5c17 (2018-07-26, "Refactor
timestamp handling") and is present in all 1.8.19 builds. The fix is a
9-line change in lib/ipmi_sel.c only (patch attached).

Could the fix be cherry-picked into the Debian package?