Re: CVE-2014-9900 fix is not upstream

From: Johannes Berg
Date: Thu Aug 25 2016 - 08:41:26 EST



> struct ethtool_wolinfo {
> ÂÂÂÂÂÂÂÂ__u32ÂÂÂcmd;
> ÂÂÂÂÂÂÂÂ__u32ÂÂÂsupported;
> ÂÂÂÂÂÂÂÂ__u32ÂÂÂwolopts;
> ÂÂÂÂÂÂÂÂ__u8ÂÂÂÂsopass[SOPASS_MAX];ÂÂÂÂÂ// 6, actually
> };
>
> we could do
>
> struct ethtool_wolinfo {
> ÂÂÂÂÂÂÂÂ__u32ÂÂÂcmd;
> ÂÂÂÂÂÂÂÂ__u32ÂÂÂsupported;
> ÂÂÂÂÂÂÂÂ__u32ÂÂÂwolopts;
> ÂÂÂÂÂÂÂÂ__u8ÂÂÂÂsopass[SOPASS_MAX];ÂÂÂÂÂ// 6, actually
> __u8 reserved[2];
> };
>
> and then the compiler has to properly treat it, since it's no longer
> unnamed padding.
>

Although, on some architectures, that could actually break the ABI by
changing the size, oh well.

johannes