From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 27 Dec 2018 10:47:54 -0500 Subject: [U-Boot] phy: Fix u-boot coruption when fixed-phy is used In-Reply-To: <6a39ed60e60f94be2af9577f88214033fdabcd40.1545235056.git.michal.simek@xilinx.com> References: <6a39ed60e60f94be2af9577f88214033fdabcd40.1545235056.git.michal.simek@xilinx.com> Message-ID: <20181227154754.GL16433@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Dec 19, 2018 at 04:57:38PM +0100, Michal Simek wrote: > When fixed-link phy is used subnode offset is used as phy address. This > number is bigger then space allocated for bus structure (allocated via > mdio_alloc). > bus->phymap[] array has PHY_MAX_ADDR size (32). > That's why writing bus->phymap[addr] where addr is < 0 or > PHY_MAX_ADDR > is causing write to memory which can caused full U-Boot crash. > > The patch is checking if address is in correct range. > > Signed-off-by: Michal Simek Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: