lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120830160948.GA26387@lutz.bln.innominate.local>
Date:	Thu, 30 Aug 2012 18:09:48 +0200
From:	Lutz Jaenicke <ljaenicke@...ominate.com>
To:	David Laight <David.Laight@...LAB.COM>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] rtnl_wilddump_request: fix alignment issue for
 embedded platforms

On Thu, Aug 30, 2012 at 04:51:49PM +0100, David Laight wrote:
> > +		/* attribute has to be NLMSG aligned */
> > +		struct rtattr ext_req
> __attribute__((aligned(NLMSG_ALIGNTO)));
> 
> Would it be better to apply the attribute to the definition
> of 'struct rtattr' itself ?

'struct rtattr' is defined in a kernel header and I am not really sure
what kind of side effects it would have.

The problem I intend to solve with my page is rather caused by the use case:
The request is sent as a single structure, the processing is however
performed step by step: first the nlmsg is parsed, then the pointer
is moved on to the parsing of the content. This pointer is hoever not
oriented at the structure element but by using size information which
is then adjust by NLMSG_ALIGN() etc. Consequently one should actually
use the same method in sending (generate the header first, then addattr_()
which enforces protocol conform alignment). This is the way all other
instances in iproute2 generate their messages btw.

I hence consider my proposed patch to be the least intrusive solution.

Best regards,
	Lutz
-- 
Dr.-Ing. Lutz Jänicke
CTO
Innominate Security Technologies AG  /protecting industrial networks/
tel: +49.30.921028-200
fax: +49.30.921028-020
Rudower Chaussee 13
D-12489 Berlin, Germany
www.innominate.com

Register Court: AG Charlottenburg, HR B 81603
Management Board: Dirk Seewald
Chairman of the Supervisory Board: Christoph Leifer
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ