Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171215185336.GO1627@brightrain.aerifal.cx>
Date: Fri, 15 Dec 2017 13:53:36 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] nameser.h: explicitely include endian.h

On Fri, Dec 15, 2017 at 12:57:21PM -0500, Rich Felker wrote:
> On Fri, Dec 15, 2017 at 06:54:10PM +0100, Bartosz Brachaczek wrote:
> > On 12/15/2017 5:38 AM, Rich Felker wrote:
> > >On Mon, Dec 04, 2017 at 12:13:06PM +0100, Jo-Philipp Wich wrote:
> > >>As nameser.h itself uses endian macros to declare the proper layout of
> > >>the HEADER structure, it needs to include the endian.h header as well.
> > >>
> > >>The issue was found while investigating iodine query packet corruption
> > >>on little endian musl systems [1].
> > >>
> > >>1: http://lists.infradead.org/pipermail/lede-dev/2017-November/010085.html
> > >>
> > >>Signed-off-by: Jo-Philipp Wich <jo@...n.io>
> > >>---
> > >>  include/arpa/nameser.h | 1 +
> > >>  1 file changed, 1 insertion(+)
> > >>
> > >>diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
> > >>index 581925a4..b315e0f3 100644
> > >>--- a/include/arpa/nameser.h
> > >>+++ b/include/arpa/nameser.h
> > >>@@ -7,6 +7,7 @@ extern "C" {
> > >>  #include <stddef.h>
> > >>  #include <stdint.h>
> > >>+#include <endian.h>
> > >>  #define __NAMESER	19991006
> > >>  #define NS_PACKETSZ	512
> > >>-- 
> > >>2.11.0
> > >
> > >Thanks. Committing.
> > 
> > I believe include/netinet/icmp6.h suffers from the same issue
> > (missing endian.h include directive).
> 
> Thanks. I'll check and fix if this is the case.

Fixed (pending push). I also grepped and didn't find any other headers
that include "BYTE_ORDER" but not "endian.h".

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.