Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/5] t7xx: validate DPMAIF RX, handshake bounds, and CLDMA teardown
@ 2026-12-03  6:26 Wanquan Zhong
  2026-12-03  6:26 ` [PATCH net 1/5] t7xx: validate PIT/BAT ids and restore failed RX BAT refill Wanquan Zhong
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Wanquan Zhong @ 2026-12-03  6:26 UTC (permalink / raw)
  To: netdev
  Cc: chandrashekar.devegowda, haijun.liu, ricardo.martinez,
	loic.poulain, ryazanov.s.a, johannes, andrew+netdev, davem,
	edumazet, kuba, pabeni, linux-kernel, zwq2226404116

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-12-03  6:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  6:26 [PATCH net 0/5] t7xx: validate DPMAIF RX, handshake bounds, and CLDMA teardown Wanquan Zhong
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox