From: Johan Hovold <johan@kernel.org>
To: Adriano Cordova <adrianox@gmail.com>
Cc: elder@kernel.org, gregkh@linuxfoundation.org,
greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org,
syzbot+2fd6aefc361af86911d5@syzkaller.appspotmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH] greybus: operation: fix out-of-bounds write in message allocation
Date: Wed, 2 Sep 2026 08:15:02 +0200 [thread overview]
Message-ID: <ape-5pTO1JuZQYoV@hovoldconsulting.com> (raw)
In-Reply-To: <20260902033017.40290-1-adrianox@gmail.com>
On Tue, Sep 01, 2026 at 11:30:16PM -0400, Adriano Cordova wrote:
> The incoming message size from the device header (header.size) is
> trusted without checking that it is at least the size of the message
> header itself, but a value smaller than sizeof(struct gb_operation_msg_hdr)
> underflows request_size in gb_operation_create_incoming(), wraps around
> in gb_operation_message_alloc(), and results in a tiny buffer that is
> then written past its end in gb_operation_message_init().
>
> Reject undersized messages before parsing the message header.
>
> Fixes: d37b1db13f8b ("greybus: refactor gb_connection_recv()")
This isn't the commit that introduced the issue (even if that commit
made things worse by removing a WARN_ON()).
> Reported-by: syzbot+2fd6aefc361af86911d5@syzkaller.appspotmail.com
> Link: https://syzkaller.appspot.com/bug?extid=2fd6aefc361af86911d5
> Cc: stable@vger.kernel.org
How did you find and fix this issue? Are you missing an Assisted-by tag
here?
> Signed-off-by: Adriano Cordova <adrianox@gmail.com>
Note that this is also being fixed here:
https://lore.kernel.org/lkml/tencent_1CB189506DEFA4B38099D654FE6C2A2F2E07@qq.com/
Johan
prev parent reply other threads:[~2026-09-02 6:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 3:30 [PATCH] greybus: operation: fix out-of-bounds write in message allocation Adriano Cordova
2026-09-02 6:15 ` Johan Hovold [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=ape-5pTO1JuZQYoV@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=adrianox@gmail.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+2fd6aefc361af86911d5@syzkaller.appspotmail.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.