Skip to content

nfc: digital: fix two bugs in NFC-DEP chaining and frame handling

Liu Chao lkml netdev oe-linux-nfc stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2nfc: digital: reserve proper headroom for chaining_skbnet/nfc/digital_dep.c+5 -50 replies
2/2nfc: digital: check resp length in digital_tg_send_atr_res_complete()net/nfc/digital_dep.c+13 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/2] nfc: digital: fix two bugs in NFC-DEP chaining and frame handling

Patch 1 fixes a guaranteed kernel panic (skb_under_panic) caused by pushing protocol headers into a chaining_skb allocated with only 1 byte of headroom. Both initiator and target paths are affected. Switch to digital_skb_alloc() which reserves the same head and tailroom used by every other send buffer in this file.

Patch 2 adds a length check in the ATR_RES completion callback as hardening; the downstream handlers already validate, so the practical impact is limited to misdirected dispatch on stale data.

Liu Chao (2):
nfc: digital: reserve proper headroom for chaining_skb
nfc: digital: check resp length in digital_tg_send_atr_res_complete()

 net/nfc/digital_dep.c | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

base-commit: e6b6078ea1731b05b3b552497b3bce4bf8b014ae

Signature · 1 line
2.50.1