Re: [PATCH v3] nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties

From: Simon Horman
Date: Mon Feb 27 2023 - 07:12:44 EST


On Mon, Feb 27, 2023 at 05:30:37PM +0800, void0red wrote:
> [You don't often get email from void0red@xxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Kang Chen <void0red@xxxxxxxxx>
>
> devm_kmalloc_array may fails, *fw_vsc_cfg might be null and cause
> out-of-bounds write in device_property_read_u8_array later.
>
> Fixes: a06347c04c13 ("NFC: Add Intel Fields Peak NFC solution driver")
> Signed-off-by: Kang Chen <void0red@xxxxxxxxx>

Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>