mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Suraj Theekshana <surajtheekshana1111@gmail.com>
Cc: vireshk@kernel.org, johan@kernel.org, elder@kernel.org,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] greybus: cap: bound IMS/auth memcpy to ioctl size
Date: Fri, 4 Sep 2026 08:28:21 +0200	[thread overview]
Message-ID: <2026090405-sushi-talcum-54c6@gregkh> (raw)
In-Reply-To: <CA+_JcNRkjeS92kc19AvMUxjdQn1GBc+8YJaOuCmZ4w++U=sf1w@mail.gmail.com>

On Fri, Sep 04, 2026 at 11:26:48AM +0530, Suraj Theekshana wrote:
> Hi Greg,
> 
> Sorry about that. I have switched Gmail to plain-text mode and am
> 
> resending with replies inline below.
> 
> > How was this found and tested?
> 
> I found it while reviewing authentication.c. I then manually reviewed
> the affected calculations and exercised them
> using a userspace ASan harness based on the Greybus structures.
> 
> The harness demonstrated the 2047-byte and 1983-byte copies into the
> 1600-byte and 320-byte destinations, respectively. It did not exercise a
> live CAP ioctl or Greybus transport and did not produce an in-kernel
> KASAN report.
> 
> I also built drivers/staging/greybus/authentication.o with W=1 on arm64,
> and the submitted patch passed checkpatch without warnings. I do not
> have access to real Greybus hardware, so it has not been tested on a
> physical device.

How well does the userspace harness actually exercise the code?  Can you
turn it into a valid kselftest test that we can add to the kernel tree
to test the kernel code?

> > And doesn't this info come from the hardware itself? Is it not trusted here?
> 
> Yes, the response length comes from the Greybus endpoint hardware or its
> firmware. My assumption was that a faulty or compromised endpoint should
> not be able to cause an out-of-bounds copy, especially during component
> authentication.
> 
> However, I did not establish that hostile Greybus hardware is within the
> kernel's intended threat model. If the endpoint is considered fully
> trusted here, then I agree that this would be defensive hardening rather
> than a demonstrated security-boundary issue.

Our documentation (which your LLM should have read), says that we trust
hardware :)

> > Did you forget an Assisted-by: tag?
> 
> Yes. That was my mistake. I used OpenAI Codex while  preparing,
> and validating the patch.

Please read:
	https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh

thanks,

greg k-h

      reply	other threads:[~2026-09-04  6:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04  3:46 Suraj Theekshana
2026-09-04  4:19 ` Greg KH
     [not found]   ` <CA+_JcNRPo1dojU4EmegM5Fv-YpZqiyd_K7SRz8km1VzzPv2nMw@mail.gmail.com>
2026-09-04  5:46     ` Greg KH
2026-09-04  5:56       ` Suraj Theekshana
2026-09-04  6:28         ` Greg KH [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=2026090405-sushi-talcum-54c6@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=elder@kernel.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=surajtheekshana1111@gmail.com \
    --cc=vireshk@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®