#1142814 libical3: 32-bit time_t boundary off by two days, corrupts recurrence queries on i386 #1142814
- Package:
- src:libical3
- Source:
- src:libical3
- Submitter:
- Edmund Lodewijks
- Date:
- 2026-07-31 16:23:02 UTC
- Severity:
- normal
- Tags:
Dear Maintainer,
On 32-bit time_t builds (i386), make_time() in src/libical/icaltime.c rejects
any date after 2038-01-17 (cf. icaltime.c around line 107). This is two days
before the actual limit of a signed 32-bit time_t (2038-01-19T03:14:07 UTC,
INT32_MAX seconds since the epoch).
Rejected dates silently fall through as time_t 0 (1970-01-01) instead of the
correct value or an explicit error.
This directly causes the cyrus-imapd i386 FTBFS tracked in #1142273:
cyrus's icalrecurrenceset_get_utc_timespan() passes INT_MAX as an "unbounded
end" search sentinel to icalcomponent_foreach_recurrence().
On i386, that sentinel collapses to epoch, shrinking the search window to
nothing-after-1970 and silently excluding every occurrence — even for ordinary
events with no relation to 2038 at all.
Upstream fix, tested (i386 build: full regression suite passes, and
cyrus-imapd's actual failing cunit test now passes unmodified):
4.0 branch: https://github.com/libical/libical/pull/1350
3.0 branch: https://github.com/libical/libical/pull/1351
Note that Trixie tracks the version 3 branch; and also that upstream dev
`winterz` indicated [0] that it would be a good idea to patch it (without
cutting a new release for version 3).
I am not sure what the best way (or the Debian way) forward is. We could either
wait for upstream to accept the patches / pull requests; or we could just
cherry-pick the patches into Debian itself already.
This would resolve the i386 side of #1142273.
Kind regards,
Edmund
[0]: https://github.com/libical/libical/pull/1351#issuecomment-5083969752
I can verify this fixes the i386 test bug on cyrus-imapd and have pushed the fix to git.
I am uploading te changes as NMU to DELAYED/5 because this blocks bringing back 32 bit support to cyrus-imapd.
Le 2026-07-31 à 08 h 40, Bastian Germann a écrit : Hello, No problem, I've checked the patch and it seems ok. I've added some minor changes to your NMU and will upload the new package today. Thanks!
We believe that the bug you reported is fixed in the latest version of libical3, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 1142814@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Nicolas Mora <babelouest@debian.org> (supplier of updated libical3 package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Fri, 31 Jul 2026 11:50:07 -0400 Source: libical3 Architecture: source Version: 3.0.20-3 Distribution: unstable Urgency: medium Maintainer: Nicolas Mora <babelouest@debian.org> Changed-By: Nicolas Mora <babelouest@debian.org> Closes: 1142814 Changes: libical3 (3.0.20-3) unstable; urgency=medium . [Bastian Germann] * Fix 32-bit time_t boundary off by two days (Closes: #1142814) . [Nicolas Mora] * d/control: Update standards version to 4.7.4 * d/control: Remove Priority option * d/control: Upgrade debhelper-compat version to 14 Checksums-Sha1: c3ac3f4f24c58031eb3224ed7328d17d6bba9e7d 2442 libical3_3.0.20-3.dsc ecd1fa3864fd70171d154dcbc79d1ceccd9d3709 973928 libical3_3.0.20.orig.tar.gz ef2a3df9edc207290b9559fc0d6e59bcbd5bafaa 24412 libical3_3.0.20-3.debian.tar.xz f0874d9e8b92f4fb454f6b4c99e2817a8013bed8 10538 libical3_3.0.20-3_amd64.buildinfo Checksums-Sha256: e01e59cdbc94fd66d1d642f0a5d960df0535aa0b20aff7b74c9aa18ac3828b6a 2442 libical3_3.0.20-3.dsc e73de92f5a6ce84c1b00306446b290a2b08cdf0a80988eca0a2c9d5c3510b4c2 973928 libical3_3.0.20.orig.tar.gz 5c0b46184ce54a590ec1b82ecbcf35a5312b99727a5ec3222ab28f4f3c68b552 24412 libical3_3.0.20-3.debian.tar.xz 6d8f7267f89f347c1d54194c80d7ddb1f3a3538166a7768425bbfceb3163ca0c 10538 libical3_3.0.20-3_amd64.buildinfo Files: 83b519c75d1d735daa15149b521018ad 2442 libs optional libical3_3.0.20-3.dsc 539a8a293d344e7aa8ccf3740494a46d 973928 libs optional libical3_3.0.20.orig.tar.gz d6f069cab533831f2b7f792996616869 24412 libs optional libical3_3.0.20-3.debian.tar.xz da102077425c9336356299114de4f9dd 10538 libs optional libical3_3.0.20-3_amd64.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEhAWwL8wo75dEyPJT/oITlEC9IrkFAmpsxZIACgkQ/oITlEC9 Irleow//dd+LcpbjqB8SVqyketZoTLxPX0iPgHcky/F05loQhVHcT+qUCKPGkAxb vdNG86A/rcPxMPAAqpn0qOJuWP33vPT3PdSVQ4oYvn8o1xARd3KnWIsnPXNmIUcf wuQ+3kwHmbnZA5BzLF06UDQJbnwQ6RFeEBO39fGxxC9bGI3amKcED6DYu70Fs/DW vr2SLDmncSppU0gRepJBMrU6cYBvOHlWKnT/KUVFowpVWs3FK5/y+CyYhXjcPEof LBrxW3khOXJBDBCcNbMgVlWUJd6NFNMyoj0fyEoALUaLGcOJa5NV8+j5bXPs0bMA wbNz6XF5V+dxOJNMYb4nLtNkbrX/8zrKqQWWLYfqyPIxGlOVM5xpAOPEvcpMWqDd 4uovY+l0XkIrloYiCKRRMyYHGaOOOx6z9Zp84VsCD9xeIF7e+Suqi2vxkhz+IfxF S32TsSaMWBUNhCCVa7/56P0jEGZtriWqtDpUBpm50yz7dSu8eMGLnAO7FRnDQZqg RkcUXs91IKW0jur2XZg7BvkES0S++m+CJpBIL26aA4imYIdbX+kGGnA3X7poiJuD 9T1IY876dFi6+mRQ5esB+atsyV+5907NLjTNFn73lRDXCFqpish73T3IKiODjmQM JuJn4vBxIocf/Gbq7Rv6w5etnnc2PXPGLhNMR1L8XyPlldFCkeY= =0jGm -----END PGP SIGNATURE-----