Re: [PATCH v2] nfc: hci: fix OOB heap read on short HCP frames
From: Jakub Kicinski
Date: Sun Apr 12 2026 - 16:42:34 EST
On Thu, 9 Apr 2026 15:08:25 +0000 Ashutosh Desai wrote:
> Suggested-by: Eric Dumazet <edumazet@xxxxxxxxxx>
As Eric mentioned elsewhere - he did not suggest any of this,
merely reviewed your submission.
> +++ b/net/nfc/hci/core.c
> @@ -134,6 +134,10 @@ static void nfc_hci_msg_rx_work(struct work_struct *work)
> u8 instruction;
>
> while ((skb = skb_dequeue(&hdev->msg_rx_queue)) != NULL) {
> + if (!pskb_may_pull(skb, NFC_HCI_HCP_HEADER_LEN)) {
> + kfree_skb(skb);
> + continue;
How did a broken packet get enqueued in the first place?