Endian problems in pdns-server recursor

Bug #60699 reported by Trevor Glen
4
Affects Status Importance Assigned to Milestone
pdns (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: pdns-server

My colleague and I have found a problem with the dns proxy in the pdns server. The current code doesn't work on a big endian machine (this problem has been replicated on a SPARC box as well as a PA-RISC box.

There were two files changed to fix this problem:
dnsproxy.cc:
173a174,177
> #ifdef WORDS_BIGENDIAN
> // this is needed because spoof ID down below does not respect the native byteorder
> d.id = ( 256 * (uint16_t)buffer[1] ) + (uint16_t)buffer[0];
> #endif

dnspacket.hh:
347,350d346
< #ifdef WORDS_BIGENDIAN
< stringbuffer[0]=(id>>8)&0xff;
< stringbuffer[1]=id&0xff;
< #else
353d348
< #endif

There are still errors that I am getting on my PA-RISC box (from the syslog):
Sep 16 19:48:31 rizzo kernel: pdns_server(5358): unaligned access to 0x44a3fb6e at ip=0x0002cd0f

I haven't investigated this other problem yet.

Revision history for this message
Lionel Le Folgoc (mrpouit) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Thanks in advance.

Changed in pdns:
status: New → Incomplete
Revision history for this message
Trevor Glen (tsg) wrote :

Without the fix described in my report, the package does not work on big-endian machines.

I am still getting the errors I described too, but they don't stop the nameserver from working.

Changed in pdns:
importance: Undecided → Low
status: Incomplete → Triaged
Revision history for this message
Peter van Dijk (habbie) wrote :

I'm the current PowerDNS upstream maintainer. I have made a note to look at your bug when I get around to it. Unified diffs instead of your format would be very welcome.

Revision history for this message
Trevor Glen (tsg) wrote :

Sorry, I no longer have that PA-RISC machine nor the code.

Changed in pdns (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.