Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Cause:
The fix for CVE-2020-29573 resulted in a regression in the printf family of functions on i686 and x86_64 when printing zero in long double format.
Consequence:
The printf function would print "nan" for zero on i686 and x86_64.
Fix:
The logic to identify NaNs was updated to ensure that printf family of functions identify NaNs correctly.
Result:
The printf family of functions now print long double zero correctly.
Description of problem:
After a certain upgrade printf of long double with a value of 0, produces "nan"
(printing non-long doubles, or long double with value other than 0 seem fine)
Version-Release number of selected component (if applicable):
How reproducible:
easily reproducible.
Steps to Reproduce:
$ cat ld2str.c
#include <stdio.h>
void main() {
long double d = 0;
printf("%Lg\r\n",d);
printf("%Lf\r\n",d);
}
$ gcc ld2str.c
$ ./a.out
Actual results:
nan
nan
Expected results:
0
0.000000
Additional info:
printf("glibc version: %s\n", gnu_get_libc_version());
glibc version: 2.17
$ rpm -q glibc
glibc-2.17-322.el7_9.x86_64
This started failing Redis's CI yesterday (only on CentOS):
https://github.com/redis/redis/runs/1827018214?check_suite_focus=true
so i suppose it's some glibc update that was rolled out by someone.
This bug seems to trigger some serious issues.
In my case the glibc-update resulted in a lot of failures in an asterisk-installation where a lot of conditionchecks in the dialplan suddenly returned "nan" instead of "0".
I had to downgrade via "yum downgrade glibc glibc-common glibc-devel glibc-headers" to 0:2.17-317.el7.
Comment 4Siddhesh Poyarekar
2021-02-05 02:10:16 UTC
*** Bug 1925306 has been marked as a duplicate of this bug. ***
(In reply to Oran Agra from comment #0)
> This started failing Redis's CI yesterday (only on CentOS):
> https://github.com/redis/redis/runs/1827018214?check_suite_focus=true
> so i suppose it's some glibc update that was rolled out by someone.
Thank you very much for this report.
This is related to the fix for CVE-2020-29573, where we made a change with limited scope to correct the security defect.
We are working to correct this issue as quickly as we can. Thank you for your patience.
I've edited the description to mention the correct expected results, given that %f does not remove trailing zeros after the decimal point:
Expected results:
0
-0
+0.000000
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 (glibc bug fix update), 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-2021:0439
Description of problem: After a certain upgrade printf of long double with a value of 0, produces "nan" (printing non-long doubles, or long double with value other than 0 seem fine) Version-Release number of selected component (if applicable): How reproducible: easily reproducible. Steps to Reproduce: $ cat ld2str.c #include <stdio.h> void main() { long double d = 0; printf("%Lg\r\n",d); printf("%Lf\r\n",d); } $ gcc ld2str.c $ ./a.out Actual results: nan nan Expected results: 0 0.000000 Additional info: printf("glibc version: %s\n", gnu_get_libc_version()); glibc version: 2.17 $ rpm -q glibc glibc-2.17-322.el7_9.x86_64 This started failing Redis's CI yesterday (only on CentOS): https://github.com/redis/redis/runs/1827018214?check_suite_focus=true so i suppose it's some glibc update that was rolled out by someone.