From: sashiko-bot@kernel.org
To: "Shunbo Shi" <shishunbo@cmss.chinamobile.com>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] greybus: verify the received message size covers the message header
Date: Thu, 12 Nov 2026 08:27:30 +0000 [thread overview]
Message-ID: <sashiko-outbox-210716@kernel.org> (raw)
In-Reply-To: <20261112082230.33584-1-shishunbo@cmss.chinamobile.com>
> In gb_connection_recv(), the size of the received data is checked
> against sizeof(struct gb_operation_msg_hdr) and against the message
> size encoded in the header (msg_size), but msg_size itself is never
> checked against the header size.
>
> If a peer sends a message whose header claims a size smaller than
> the header itself (e.g. header.size == 3), the two existing checks
> both pass (size >= sizeof(header) and size >= msg_size), and the
> message is dispatched with the undersized msg_size.
>
> In gb_operation_create_incoming(), this leads to an unsigned
> integer underflow in:
>
> request_size = size - sizeof(struct gb_operation_msg_hdr);
>
> [ ... ]
>
> Fixes: d90c25b0a279 ("greybus: let operation layer examine incoming data")
> Reported-by: syzbot+0b456664585fa81a47f6@syzkaller.appspotmail.com
> Closes: https://syzbot.org/bug?extid=0b456664585fa81a47f6
> Signed-off-by: Shunbo Shi <shishunbo@cmss.chinamobile.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112082230.33584-1-shishunbo@cmss.chinamobile.com?part=1
next prev parent reply other threads:[~2026-11-12 8:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 5:56 [syzbot] [greybus?] [usb?] KASAN: slab-out-of-bounds Read in gb_operation_work syzbot
2026-11-12 8:22 ` [PATCH] greybus: verify the received message size covers the message header Shunbo Shi
2026-11-12 8:27 ` sashiko-bot [this message]
2026-11-12 8:43 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2026-11-12 7:12 Shunbo Shi
2026-11-12 7:17 ` sashiko-bot
2026-11-12 8:09 ` Shunbo Shi
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=sashiko-outbox-210716@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shishunbo@cmss.chinamobile.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.