Re: [PATCH v2] tty: rocket: Fix possible buffer overwrite on register_PCI

From: Greg Kroah-Hartman
Date: Tue Sep 18 2018 - 09:38:05 EST


On Mon, Aug 06, 2018 at 05:10:57PM +0300, Anton Vasilyev wrote:
> If number of isa and pci boards exceed NUM_BOARDS on the path
> rp_init()->init_PCI()->register_PCI() then buffer overwrite occurs
> in register_PCI() on assign rcktpt_io_addr[i].
>
> The patch adds check on upper bound for index of registered
> board in register_PCI.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Anton Vasilyev <vasilyev@xxxxxxxxx>
> ---
> v2: do not enable device which will not be managed by driver.
> Based on Alan's comment.

This patch doesn't apply to my tree at all :(

Can you rebase and resend?

thanks,

greg k-h