Re: [PATCH] mailbox: Prevent out-of-bounds access in of_mbox_index_xlate()
From: Greg KH
Date: Wed Mar 04 2026 - 04:17:16 EST
On Wed, Mar 04, 2026 at 07:30:52AM +0000, Joonwon Kang wrote:
> [ Upstream commit fcd7f96c783626c07ee3ed75fa3739a8a2052310 ]
>
> Although it is guided that `#mbox-cells` must be at least 1, there are
> many instances of `#mbox-cells = <0>;` in the device tree. If that is
> the case and the corresponding mailbox controller does not provide
> `fw_xlate` and of_xlate` function pointers, `of_mbox_index_xlate()` will
> be used by default and out-of-bounds accesses could occur due to lack of
> bounds check in that function.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Joonwon Kang <joonwonkang@xxxxxxxxxx>
> Signed-off-by: Jassi Brar <jassisinghbrar@xxxxxxxxx>
> [ changed sp->nargs to sp->args_count in the code and
> fw_mbox_index_xlate() to of_mbox_index_xlate() in the commit message. ]
> Signed-off-by: Joonwon Kang <joonwonkang@xxxxxxxxxx>
> ---
> drivers/mailbox/mailbox.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
What kernel tree(s) is this for?