Re: [PATCH] net: nfc: nci: Fix parameter validation for packet data

From: Michael Thalmeier
Date: Wed Dec 10 2025 - 03:03:19 EST


On 12/9/25 17:31, Simon Horman wrote:
On Tue, Dec 09, 2025 at 02:21:03PM +0100, Michael Thalmeier wrote:
Since commit 8fcc7315a10a ("net: nfc: nci: Add parameter validation for
packet data") communication with nci nfc chips is not working any more.

The mentioned commit tries to fix access of uninitialized data, but
failed to understand that in some cases the data packet is of variable
length and can therefore not be compared to the maximum packet length
given by the sizeof(struct).

For these cases it is only possible to check for minimum packet length.

Fixes: 8fcc7315a10a ("net: nfc: nci: Add parameter validation for packet data")

Hi Michael,

I don't see that hash in net. Perhaps it should be:

Fixes: 9c328f54741b ("net: nfc: nci: Add parameter validation for packet data")

Hi Simon,

You are right. This was a hash from a stable branch.
I will send a v2.


Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Michael Thalmeier <michael.thalmeier@xxxxxxx>

...