All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Kees Cook <kees@kernel.org>
Cc: Marek Vasut <marex@denx.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>, Luca Ellero <l.ellero@asem.it>,
	linux-input@vger.kernel.org,
	Alexander Stein <alexander.stein@ew.tq-group.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH] Input: ads7846 - Expand xfer array to match usage
Date: Mon, 18 Nov 2024 04:57:12 +0000	[thread overview]
Message-ID: <ZzrJKKoCr7cUNVwC@google.com> (raw)
In-Reply-To: <202411172038.DF2CF9CD@keescook>

On Sun, Nov 17, 2024 at 08:39:01PM -0800, Kees Cook wrote:
> On Sun, Nov 17, 2024 at 11:06:27PM +0100, Marek Vasut wrote:
> > On 11/17/24 4:34 AM, Kees Cook wrote:
> > > Commit 781a07da9bb9 ("Input: ads7846 - add dummy command register
> > > clearing cycle") added commands to struct ser_req::xfer without
> > > expanding it to hold them. Expand the array to the correct size.
> > > 
> > > ../drivers/input/touchscreen/ads7846.c: In function 'ads7846_read12_ser':
> > > ../drivers/input/touchscreen/ads7846.c:416:18: error: array subscript 7 is above array bounds of 'struct spi_transfer[6]' [-Werror=array-bounds=]
> > >    416 |         req->xfer[7].rx_buf = &req->scratch;
> > >        |         ~~~~~~~~~^~~
> > > ../drivers/input/touchscreen/ads7846.c:334:33: note: while referencing 'xfer'
> > >    334 |         struct spi_transfer     xfer[6];
> > >        |                                 ^~~~
> > > 
> > > Fixes: 781a07da9bb9 ("Input: ads7846 - add dummy command register clearing cycle")
> > > Signed-off-by: Kees Cook <kees@kernel.org>
> > I think Nathan already sent a fix too.
> 
> Oh excellent! I did a search in lore before sending it but must have
> failed to find it. Do you have a link to it?

I am pretty sure I applied the fix already, but I might have forgotten
to push it out. My workstation is offline at the moment, when it comes
back online I'll make sure the fix is there.

Thanks.

-- 
Dmitry

      reply	other threads:[~2024-11-18  4:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-17  3:34 [PATCH] Input: ads7846 - Expand xfer array to match usage Kees Cook
2024-11-17 22:06 ` Marek Vasut
2024-11-18  4:39   ` Kees Cook
2024-11-18  4:57     ` Dmitry Torokhov [this message]

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=ZzrJKKoCr7cUNVwC@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=kees@kernel.org \
    --cc=l.ellero@asem.it \
    --cc=linus.walleij@linaro.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=viro@zeniv.linux.org.uk \
    /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.