Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Maoyi Xie <maoyixie.tju@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH rtw-next v3 3/4] wifi: rtw89: fw: check C2H event length
Date: Sun, 6 Dec 2026 02:05:24 +0000	[thread overview]
Message-ID: <14639d0e45264f0aaed20dbc9d790250@realtek.com> (raw)
In-Reply-To: <20261204074944.2942452-4-maoyixie.tju@gmail.com>


Maoyi Xie <maoyixie.tju@gmail.com> wrote:
> Nothing checks the length field of the C2H header against the skb. If
> the header claims more data than arrived, the debug prints of the LPS
> report handler read up to 16 KB past the skb data, even with the debug
> mask off.
> 
> Drop such events in rtw89_fw_c2h_cmd_handle(). In the LPS report
> handler, check the event length before reading the counts.
> 
> Found with a CodeQL-based static analysis tool. Reproduced in a
> userspace harness under AddressSanitizer. Not tested on hardware.
> 
> Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>


  reply	other threads:[~2026-12-06  2:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  7:49 [PATCH rtw-next v3 0/4] wifi: rtw89: check lengths and indices reported by the chip Maoyi Xie
2026-12-04  7:49 ` [PATCH rtw-next v3 1/4] wifi: rtw89: pci: reject oversized RX packets Maoyi Xie
2026-12-06  2:04   ` Ping-Ke Shih
2026-12-06  3:05   ` Ping-Ke Shih
2026-12-04  7:49 ` [PATCH rtw-next v3 2/4] wifi: rtw89: pci: validate hardware index of BD ring Maoyi Xie
2026-12-04  7:49 ` [PATCH rtw-next v3 3/4] wifi: rtw89: fw: check C2H event length Maoyi Xie
2026-12-06  2:05   ` Ping-Ke Shih [this message]
2026-12-04  7:49 ` [PATCH rtw-next v3 4/4] wifi: rtw89: phy: check cur_idx of TAS power report Maoyi Xie

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=14639d0e45264f0aaed20dbc9d790250@realtek.com \
    --to=pkshih@realtek.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maoyixie.tju@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox