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] [thread-next>] [day] [month] [year] [list]
Message-ID: <51e706400b914552bfda6353020da17e@AcuMS.aculab.com>
Date:   Thu, 14 Apr 2022 08:41:20 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Michael Straube' <straube.linux@...il.com>,
        Larry Finger <Larry.Finger@...inger.net>
CC:     Phillip Potter <phil@...lpotter.co.uk>,
        Greg KH <gregkh@...uxfoundation.org>,
        "open list:STAGING SUBSYSTEM" <linux-staging@...ts.linux.dev>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: staging: r8188eu: struct rt_firmware_header issues

From: Michael Straube
> Sent: 13 April 2022 20:42
> 
> On 4/13/22 18:27, Michael Straube wrote:
> > Hi all,
> >
> > I think the rt_firmware_hdr structure in rtw_fw.c has some issues.
> >
> >
> > struct rt_firmware_hdr {
> >      /*  8-byte alinment required */

Probably need an __aligned(8) at the bottom then?

> >      /*  LONG WORD 0 ---- */
> >      __le16        Signature;    /* 92C0: test chip; 92C,
> >                       * 88C0: test chip; 88C1: MP A-cut;
> >                       * 92C1: MP A-cut */
> >      u8        Category;    /*  AP/NIC and USB/PCI */
> >      u8        Function;    /*  Reserved for different FW function
> >                       *  indcation, for further use when
> >                       *  driver needs to download different
> >                       *  FW for different conditions */
> >      __le16        Version;    /*  FW Version */
> >      u8        Subversion;    /*  FW Subversion, default 0x00 */
> >      u16        Rsvd1;
> >
> >      /*  LONG WORD 1 ---- */
> >      u8        Month;    /*  Release time Month field */
> >      u8        Date;    /*  Release time Date field */
> >      u8        Hour;    /*  Release time Hour field */
> >      u8        Minute;    /*  Release time Minute field */
> >      __le16        RamCodeSize;    /*  The size of RAM code */
> >      u8        Foundry;
> >      u8        Rsvd2;
> >
> >      /*  LONG WORD 2 ---- */
> >      __le32        SvnIdx;    /*  The SVN entry index */
> >      u32        Rsvd3;
> >
> >      /*  LONG WORD 3 ---- */
> >      u32        Rsvd4;
> >      u32        Rsvd5;
> > };
...
> 
> Ok, I figured it out by looking at the hexdumps of firmware files. The
> field Rsvd1 should be u8 instead of u16. I'll prepare a patch for this.

I'd also add a compile-time assert on the size.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ