Re: CVE-2014-9900 fix is not upstream
From: Joe Perches
Date: Tue Aug 23 2016 - 16:36:38 EST
On Tue, 2016-08-23 at 21:09 +0100, Al Viro wrote:
> On Tue, Aug 23, 2016 at 11:24:06AM -0700, David Miller wrote:
> > > On some versions and architectures. Can you guarantee that you will
> > > notice when an exception appears?
> > Again, show me the assembler output exhibiting the lack of
> > initialization, for this specific structure and situation.
> >
> > That's all that I'm asking.
> ... and then we can file a bug report against the sodding compiler. Note
> that
> struct ethtool_wolinfo {
> __u32 cmd;
> __u32 supported;
> __u32 wolopts;
> __u8 sopass[SOPASS_MAX]; // 6, actually
> };
> is not going to *have* padding. Not on anything even remotely sane.
> If array of 6 char as member of a struct requires 64bit alignment on some
> architecture, I would really like some of what the designers of that ABI
> must have been smoking.
try this on x86-64
$ pahole -C ethtool_wolinfo vmlinux
struct ethtool_wolinfo {
__u32 cmd; /* 0 4 */
__u32 supported; /* 4 4 */
__u32 wolopts; /* 8 4 */
__u8 sopass[6]; /* 12 6 */
/* size: 20, cachelines: 1, members: 4 */
/* padding: 2 */
/* last cacheline: 20 bytes */
};