lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181203155150.ohsc42cbbkkgrvsm@kahuna>
Date:   Mon, 3 Dec 2018 09:51:50 -0600
From:   Nishanth Menon <nm@...com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
CC:     Jassi Brar <jassisinghbrar@...il.com>,
        <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] mailbox: ti-msgmgr: Off by one in ti_msgmgr_of_xlate()

On 17:50-20181203, Dan Carpenter wrote:
> The > comparison should be >= or we access one element beyond the end
> of the array.
> 
> (The inst->qinsts[] array is allocated in the ti_msgmgr_probe() function
> and it has ->num_valid_queues elements.)
> 
> Fixes: a2b79838b891 ("mailbox: ti-msgmgr: Add support for Secure Proxy")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
>  drivers/mailbox/ti-msgmgr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c
> index 713d701b6568..6f6addd51d14 100644
> --- a/drivers/mailbox/ti-msgmgr.c
> +++ b/drivers/mailbox/ti-msgmgr.c
> @@ -547,7 +547,7 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct mbox_controller *mbox,
>  	}
>  
>  	if (d->is_sproxy) {
> -		if (req_pid > d->num_valid_queues)
> +		if (req_pid >= d->num_valid_queues)
>  			goto err;
>  		qinst = &inst->qinsts[req_pid];
>  		return qinst->chan;
> -- 
> 2.11.0
> 

OOpps.. Thanks for catching it.

Acked-by: Nishanth Menon <nm@...com>

-- 
Regards,
Nishanth Menon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ