linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jackysliu <1972843537@qq.com>
To: gregkh@linuxfoundation.org
Cc: 1972843537@qq.com, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH v2] usb: gadget: functioni: Fix a oob problem in rndis
Date: Fri, 11 Jul 2025 14:40:19 +0800	[thread overview]
Message-ID: <tencent_693B44F3060A525A26EEC5ED8DFF5E92C906@qq.com> (raw)
In-Reply-To: <2025071150-removal-bullring-5649@gregkh>

On Fri, Jul 11, 2025 at 11:46:35AM +0800, greg k-h wrote
>Sure, but again, BufLength is not used for anything, so the value of
>that variable means nothing as far as I can tell.
>How exactly?  Again, BufLength isn't even used in that function
function contains below code:
if (gen_ndis_set_resp(params, le32_to_cpu(buf->OID),
			((u8 *)buf) + 8 + BufOffset, BufLength, r))
((u8 *)buf) + 8 + BufOffset determins base address of buffer 
and BufLength determins buflen.

>How was this tested?
>
>And even more importantly, how did you find this bug?  What triggered
>it?
I detected this problem through static analysis and calibrated
 the device via qemu emulation.

Anyway,this problem seems hard to fix, I'll try my best.

Thanks

Thanks

Siyang Liu


  reply	other threads:[~2025-07-11  6:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10  8:14 [PATCH] usb: gadget: functioni: Fix a oob problem in rndis jackysliu
2025-07-10  8:21 ` Greg KH
2025-07-10  8:49   ` [PATCH v2] " jackysliu
2025-07-10  9:16     ` Greg KH
2025-07-10  9:33       ` jackysliu
2025-07-10  9:34       ` Greg KH
2025-07-10 12:19     ` Greg KH
2025-07-11  3:46       ` jackysliu
2025-07-11  5:54         ` Greg KH
2025-07-11  6:40           ` jackysliu [this message]
2025-07-11  6:51             ` Greg KH
2025-07-15  8:20               ` jackysliu
2025-07-15  8:32                 ` Greg KH
2025-07-15  8:47                   ` jackysliu
  -- strict thread matches above, loose matches on Subject: below --
2025-06-19  4:03 [PATCH v2] scsi: fix out of bounds error in /drivers/scsi jackysliu
2025-07-15  7:56 ` [PATCH v2] usb: gadget: functioni: Fix a oob problem in rndis jackysliu

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=tencent_693B44F3060A525A26EEC5ED8DFF5E92C906@qq.com \
    --to=1972843537@qq.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).