mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Shengzhuo Wei" <me@cherr.cc>
To: "Christian Lamparter" <chunkeey@googlemail.com>,
	 "Michael Wu" <flamingice@sourmilk.net>,
	 "David S. Miller" <davem@davemloft.net>,
	 "John W. Linville" <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	 <stable@vger.kernel.org>, "Shengzhuo Wei" <me@cherr.cc>,
	 "Christian Lamparter" <chunkeey@gmail.com>
Subject: [PATCH v2 0/2] wifi: p54: validate PDA entry data lengths in eeprom parser
Date: Mon, 31 Aug 2026 02:42:11 +0800	[thread overview]
Message-ID: <20260831-p54-pda-validation-v2-0-dae566b388c8@cherr.cc> (raw)

p54_parse_eeprom() walks PDA records supplied in the device EEPROM but
several handlers consume entry->data without first checking that the
entry actually carries enough bytes, so a malformed or truncated image
makes them read past the EEPROM buffer. This series adds the missing
length checks in two places: the PA calibration curve data and the
interface-list records. It continues the EEPROM trust-boundary
hardening of da1b9a55ff11 ("wifi: p54: prevent buffer-overflow in
p54_rx_eeprom_readback()") and ebd6d37fa94b ("wifi: p54: validate RX
frame length in p54_rx_eeprom_readback()").

Patch 1 rejects the PA calibration curve entry when the channel and
points-per-channel counts it advertises do not fit in the entry data,
the same check p54_convert_output_limits() and p54_convert_db() already
apply to their counts. Patch 2 advances the interface-list walk only
while a full struct exp_if record still fits, instead of reading one
from a trailing partial record.

---
Changes in v2:
- move the curve data length checks into p54_convert_rev0() and
  p54_convert_rev1() (Christian Lamparter)
- collect Acked-by from Christian for the interface-list patch
- Link to v1: https://lore.kernel.org/r/20260827-p54-pda-validation-v1-0-bdc2b0675056@cherr.cc

---
Shengzhuo Wei (2):
      wifi: p54: validate curve data length in the calibration curve converters
      wifi: p54: require a full exp_if record in PDR_INTERFACE_LIST

 drivers/net/wireless/intersil/p54/eeprom.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
---
base-commit: 66fb95a521110da673090294561844c9f76ebe64
change-id: 20260826-p54-pda-validation-7b2e91f4c6a3

Best regards,
--  
Shengzhuo Wei <me@cherr.cc>

             reply	other threads:[~2026-08-30 18:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 18:42 Shengzhuo Wei [this message]
2026-08-30 18:42 ` [PATCH v2 1/2] wifi: p54: validate curve data length in the calibration curve converters Shengzhuo Wei
2026-09-06  9:31   ` Christian Lamparter
2026-09-06 11:43     ` Shengzhuo Wei
2026-09-06 14:02       ` Christian Lamparter
2026-08-30 18:42 ` [PATCH v2 2/2] wifi: p54: require a full exp_if record in PDR_INTERFACE_LIST Shengzhuo Wei

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=20260831-p54-pda-validation-v2-0-dae566b388c8@cherr.cc \
    --to=me@cherr.cc \
    --cc=chunkeey@gmail.com \
    --cc=chunkeey@googlemail.com \
    --cc=davem@davemloft.net \
    --cc=flamingice@sourmilk.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=stable@vger.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®