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.
I have also encountered this bug. It exists on PPC64. The cause is that the xdr_putlong uses a long to store the converted value, then passes it to fwrite as a byte buffer. Only the first 4 bytes are written, which is okay for a LE system after byteswapping, but writes all zeroes on BE systems.
in xdr_stdio.c:
115 xdrstdio_putlong(xdrs, lp)
116 XDR *xdrs;
117 const long *lp;
118 {
119 long mycopy = (long)htonl((u_int32_t)*lp);
120
121 if (fwrite(&mycopy, sizeof(int32_t), 1, (FILE *)xdrs->x_private) != 1)
122 return (FALSE);
123 return (TRUE);
124 }
It seems incorrect to make "mycopy" a long instead of a u_int32_t, especially considering the result on BE systems.
Endianness makes the difference. The code as is passes on LE systems, but fails on BE systems.
As explained above, it writes 4 bytes into an 8-byte temporary variable, then uses the pointer to the first 4 bytes in its write. On LE systems, the first 4 bytes have the converted value. On BE systems, the last 4 bytes have it and the first 4 are all zeroes.
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:3312
I have also encountered this bug. It exists on PPC64. The cause is that the xdr_putlong uses a long to store the converted value, then passes it to fwrite as a byte buffer. Only the first 4 bytes are written, which is okay for a LE system after byteswapping, but writes all zeroes on BE systems. in xdr_stdio.c: 115 xdrstdio_putlong(xdrs, lp) 116 XDR *xdrs; 117 const long *lp; 118 { 119 long mycopy = (long)htonl((u_int32_t)*lp); 120 121 if (fwrite(&mycopy, sizeof(int32_t), 1, (FILE *)xdrs->x_private) != 1) 122 return (FALSE); 123 return (TRUE); 124 } It seems incorrect to make "mycopy" a long instead of a u_int32_t, especially considering the result on BE systems.