All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Markus Mayer <mmayer@broadcom.com>
Cc: Colin Ian King <colin.king@canonical.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux ARM Kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3] memory: brcmstb_dpfe: fix array index out of bounds
Date: Sat, 22 Aug 2020 22:56:33 +0200	[thread overview]
Message-ID: <20200822205633.GA8809@kozik-lap> (raw)
In-Reply-To: <20200822205000.15841-1-mmayer@broadcom.com>

On Sat, Aug 22, 2020 at 01:50:00PM -0700, Markus Mayer wrote:
> We would overrun the error_text array if we hit a TIMEOUT condition,
> because we were using the error code "ETIMEDOUT" (which is 110) as an
> array index.
> 
> We fix the problem by correcting the array index and by providing a
> function to retrieve error messages rather than accessing the array
> directly. The function includes a bounds check that prevents the array
> from being overrun.
> 
> This patch was prepared in response to
>     https://lkml.org/lkml/2020/8/18/505.
> 
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
> Reported-by: Colin Ian King <colin.king@canonical.com>
> ---
> 
> Changes since v2:
>     - Added "Fixes:" and "Reported-by:"
>     - Fixed "From" address
>     - No changes to the code
> 
> Changes since v1:
>     - Added link of the coverity report to the commit message.
>     - Added Florian's ack.
>     - Removed second "const" from get_error_text() return type
>       (thanks to the kernel test robot).
> 
>  drivers/memory/brcmstb_dpfe.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)

"From" and SoB look good now.

Thanks, applied.

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Markus Mayer <mmayer@broadcom.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Colin Ian King <colin.king@canonical.com>,
	BCM Kernel Feedback <bcm-kernel-feedback-list@broadcom.com>,
	Linux ARM Kernel <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] memory: brcmstb_dpfe: fix array index out of bounds
Date: Sat, 22 Aug 2020 22:56:33 +0200	[thread overview]
Message-ID: <20200822205633.GA8809@kozik-lap> (raw)
In-Reply-To: <20200822205000.15841-1-mmayer@broadcom.com>

On Sat, Aug 22, 2020 at 01:50:00PM -0700, Markus Mayer wrote:
> We would overrun the error_text array if we hit a TIMEOUT condition,
> because we were using the error code "ETIMEDOUT" (which is 110) as an
> array index.
> 
> We fix the problem by correcting the array index and by providing a
> function to retrieve error messages rather than accessing the array
> directly. The function includes a bounds check that prevents the array
> from being overrun.
> 
> This patch was prepared in response to
>     https://lkml.org/lkml/2020/8/18/505.
> 
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
> Reported-by: Colin Ian King <colin.king@canonical.com>
> ---
> 
> Changes since v2:
>     - Added "Fixes:" and "Reported-by:"
>     - Fixed "From" address
>     - No changes to the code
> 
> Changes since v1:
>     - Added link of the coverity report to the commit message.
>     - Added Florian's ack.
>     - Removed second "const" from get_error_text() return type
>       (thanks to the kernel test robot).
> 
>  drivers/memory/brcmstb_dpfe.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)

"From" and SoB look good now.

Thanks, applied.

Best regards,
Krzysztof


  reply	other threads:[~2020-08-22 20:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-22 20:50 [PATCH v3] memory: brcmstb_dpfe: fix array index out of bounds Markus Mayer
2020-08-22 20:50 ` Markus Mayer
2020-08-22 20:56 ` Krzysztof Kozlowski [this message]
2020-08-22 20:56   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200822205633.GA8809@kozik-lap \
    --to=krzk@kernel.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=colin.king@canonical.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmayer@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.