Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] hdlc_cisco/hdlc_fr: shut down protocol timers on ->detach
@ 2026-11-03 14:20 Chengyu Liu
  2026-11-03 14:20 ` [PATCH net-next v3 1/2] hdlc_cisco: shut down the keepalive timer " Chengyu Liu
  2026-11-03 14:20 ` [PATCH net-next v3 2/2] hdlc_fr: shut down the LMI timer in fr_destroy() Chengyu Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Chengyu Liu @ 2026-11-03 14:20 UTC (permalink / raw)
  To: netdev; +Cc: pabeni, horms, khc, Chengyu Liu

Both cisco and fr arm a self-re-arming timer in ->start() but never shut
it down on the protocol-detach path: detach_hdlc_protocol() calls only
->detach() (never ->stop()) and then kfree()s hdlc->state, so
unregistering an up device leaves the timer armed on freed memory.  This
is the same defect class as CVE-2026-63803 ("hdlc_ppp: sync per-proto
timers before freeing hdlc state").

Each patch shuts the respective timer down with timer_shutdown_sync() and
moves timer_setup() to the attach ioctl (attach_hdlc_protocol() uses
kmalloc(), so the timer must be initialized exactly once at attach time).
Both bugs were found by static analysis and confirmed with a KASAN
reproducer (slab-use-after-free in the timer softirq after rmmod of an up
device).

---
v3: process-only repost, no code change; fix mail setup (previous relay
    rewrote Message-IDs, breaking threading and preventing the series
    from being assembled by the CI bots); add lore links below.
v2: https://lore.kernel.org/netdev/tencent_BA6DA4F17D2035F5DEEEA21B9578E2234307@qq.com/
  - retarget to net-next and drop Cc: stable per maintainer guidance;
    carry Simon's Reviewed-by; no code change.
v1: https://lore.kernel.org/netdev/tencent_83B7D10D4DBCC6118AB6F6B83A509FFA5C06@qq.com/

Chengyu Liu (2):
  hdlc_cisco: shut down the keepalive timer on ->detach
  hdlc_fr: shut down the LMI timer in fr_destroy()

 drivers/net/wan/hdlc_cisco.c | 10 +++++++++-
 drivers/net/wan/hdlc_fr.c    |  5 ++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.25.1

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

end of thread, other threads:[~2026-11-03 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 14:20 [PATCH net-next v3 0/2] hdlc_cisco/hdlc_fr: shut down protocol timers on ->detach Chengyu Liu
2026-11-03 14:20 ` [PATCH net-next v3 1/2] hdlc_cisco: shut down the keepalive timer " Chengyu Liu
2026-11-03 14:20 ` [PATCH net-next v3 2/2] hdlc_fr: shut down the LMI timer in fr_destroy() Chengyu Liu

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