hdlc_cisco/hdlc_fr: shut down protocol timers on ->detach
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | hdlc_cisco: shut down the keepalive timer on ->detachdrivers/ | +9 | 0 replies | Applied |
| 2/2 | hdlc_fr: shut down the LMI timer in fr_destroy()drivers/ | +4 | 0 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Simon Horman |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v3 0/2] hdlc_cisco/hdlc_fr: shut down protocol timers on ->detach
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/[email protected]/
- 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/[email protected]/
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(-)
Signature · 1 line
2.25.1