Re: [PATCH net] net: pse-pd: fix out-of-bounds bitmap access in pse_isr() on 32-bit

From: Oleksij Rempel

Date: Tue Apr 14 2026 - 14:50:42 EST


Hi Kory,

On Tue, Apr 14, 2026 at 05:13:30PM +0200, Kory Maincent wrote:
> @@ -1340,6 +1341,11 @@ int devm_pse_irq_helper(struct pse_controller_dev *pcdev, int irq,
> if (!h->notifs)
> return -ENOMEM;
>
> + h->notifs_mask = devm_kcalloc(dev, BITS_TO_LONGS(pcdev->nr_lines),
> + sizeof(*h->notifs_mask), GFP_KERNEL);

May be better devm_bitmap_zalloc() instead of devm_kcalloc()?

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |