[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180419.163527.1045982100731748391.davem@davemloft.net>
Date: Thu, 19 Apr 2018 16:35:27 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: michael.chan@...adcom.com
Cc: netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH net] bnxt_en: Fix memory fault in bnxt_ethtool_init()
From: Michael Chan <michael.chan@...adcom.com>
Date: Thu, 19 Apr 2018 03:16:16 -0400
> From: Vasundhara Volam <vasundhara-v.volam@...adcom.com>
>
> In some firmware images, the length of BNX_DIR_TYPE_PKG_LOG nvram type
> could be greater than the fixed buffer length of 4096 bytes allocated by
> the driver. This was causing HWRM_NVM_READ to copy more data to the buffer
> than the allocated size, causing general protection fault.
>
> Fix the issue by allocating the exact buffer length returned by
> HWRM_NVM_FIND_DIR_ENTRY, instead of 4096. Move the kzalloc() call
> into the bnxt_get_pkgver() function.
>
> Fixes: 3ebf6f0a09a2 ("bnxt_en: Add installed-package firmware version reporting via Ethtool GDRVINFO")
> Signed-off-by: Vasundhara Volam <vasundhara-v.volam@...adcom.com>
> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
Applied, thanks Michael.
Powered by blists - more mailing lists