Netdev List
 help / color / mirror / Atom feed
From: Wanquan Zhong <zwq2226404116@163.com>
To: netdev@vger.kernel.org
Cc: chandrashekar.devegowda@intel.com, haijun.liu@mediatek.com,
	ricardo.martinez@linux.intel.com, loic.poulain@oss.qualcomm.com,
	ryazanov.s.a@gmail.com, johannes@sipsolutions.net,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org,
	zwq2226404116@163.com
Subject: [PATCH net 0/5] t7xx: validate DPMAIF RX, handshake bounds, and CLDMA teardown
Date: Thu,  3 Dec 2026 14:26:30 +0800	[thread overview]
Message-ID: <cover.1796279181.git.zwq2226404116@163.com> (raw)

Malformed modem PIT/BAT and handshake blobs can OOB the host driver.
An in-flight CLDMA IRQ can requeue work after stop and UAF the rings.
Handshake work and skb ownership races can double-free.

Each patch is one failure class:

  0001  DPMAIF RX validation and BAT refill
        A.1.a  PIT/BAT buffer_id used as index before validation
        A.1.c  partial BAT refill loses unreplenished RX slots
        B.4    PIT nr_frags exceeds MAX_SKB_FRAGS
        B.5    32-bit DMA offset truncates a 64-bit address
        A.1.b  already in t7xx_ccmni_recv_skb() (no change)

  0002  control / PORT_ENUM payload length
        B.3    PORT_ENUM length / port_count OOB

  0003  runtime-feature handshake blob bounds
        B.1    malformed runtime-feature data OOB read

  0004  CLDMA IRQ/work vs ring teardown
        B.2    in-flight IRQ requeues work after stop (UAF)
        F.3    same class; not copied from the Fibocom empty-handler
               lock wrap

  0005  handshake races and remaining skb lifetime bugs
        F.1    MHCCIF re-queues handshake while the first run is active
        F.2    core_ap.ready stays set; handshake races cldma_reset
        F.4    CLDMA TX sleep-disable timeout double-free
        F.5    dedicated recv error return double-free
        F.6    DPMAIF TX peek/unlink UAF

0001 is DPMAIF data path only. Control-message checks are 0002.

B.1 still rejects a truncated feature (-EINVAL) but does not require
FEATURE_COUNT entries; firmware may advertise a subset of complete
features.

Signed-off-by: Wanquan Zhong <zwq2226404116@163.com>
---
Wanquan Zhong (5):
  t7xx: validate PIT/BAT ids and restore failed RX BAT refill
  t7xx: validate control-message and PORT_ENUM payload lengths
  t7xx: reject malformed runtime-feature handshake data
  t7xx: stop in-flight CLDMA IRQ and work before ring teardown
  t7xx: fix handshake races and skb double-free on TX/RX

 drivers/net/wwan/t7xx/t7xx_hif_cldma.c     | 125 +++++++----
 drivers/net/wwan/t7xx/t7xx_hif_cldma.h     |   2 +
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c    |   4 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h    |   1 +
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c | 231 ++++++++++++++++-----
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h |   7 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c |   5 +-
 drivers/net/wwan/t7xx/t7xx_modem_ops.c     |  65 ++++--
 drivers/net/wwan/t7xx/t7xx_port_ctrl_msg.c |  21 +-
 drivers/net/wwan/t7xx/t7xx_port_proxy.c    |   3 +-
 drivers/net/wwan/t7xx/t7xx_state_monitor.c |   1 +
 11 files changed, 353 insertions(+), 112 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-12-03  6:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  6:26 Wanquan Zhong [this message]
2026-12-03  6:26 ` [PATCH net 1/5] t7xx: validate PIT/BAT ids and restore failed RX BAT refill Wanquan Zhong
2026-12-03  6:26 ` [PATCH net 2/5] t7xx: validate control-message and PORT_ENUM payload lengths Wanquan Zhong
2026-12-03  6:26 ` [PATCH net 3/5] t7xx: reject malformed runtime-feature handshake data Wanquan Zhong
2026-12-03  6:26 ` [PATCH net 4/5] t7xx: stop in-flight CLDMA IRQ and work before ring teardown Wanquan Zhong
2026-12-03  6:26 ` [PATCH net 5/5] t7xx: fix handshake races and skb double-free on TX/RX Wanquan Zhong
2026-12-03  6:33 ` [PATCH net 0/5] t7xx: validate DPMAIF RX, handshake bounds, and CLDMA teardown netdev-bot+sinfo

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=cover.1796279181.git.zwq2226404116@163.com \
    --to=zwq2226404116@163.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=haijun.liu@mediatek.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ricardo.martinez@linux.intel.com \
    --cc=ryazanov.s.a@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