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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240111001523f69f6a29@mail.local>
Date: Thu, 11 Jan 2024 01:15:23 +0100
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Frank Li <Frank.Li@....com>
Cc: conor.culhane@...vaco.com, imx@...ts.linux.dev, joe@...ches.com,
	linux-i3c@...ts.infradead.org, linux-kernel@...r.kernel.org,
	miquel.raynal@...tlin.com, zbigniew.lukwinski@...ux.intel.com
Subject: Re: [PATCH 1/1] i3c: master: svc: return error when read length
 bigger than 255

On 10/01/2024 17:25:03-0500, Frank Li wrote:
> RDTERM in MCTRL is 8 bits. Add a length check to prevent silent data errors
> when the read length exceeds 255 bytes during each i3c_priv_xfer operation.
> 
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---
>  drivers/i3c/master/svc-i3c-master.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
> index bd10bb698da0f..181b56953fb28 100644
> --- a/drivers/i3c/master/svc-i3c-master.c
> +++ b/drivers/i3c/master/svc-i3c-master.c
> @@ -1375,6 +1375,11 @@ static int svc_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
>  		cmd->len = xfers[i].len;
>  		cmd->actual_len = xfers[i].rnw ? xfers[i].len : 0;
>  		cmd->continued = (i + 1) < nxfers;
> +
> +		if (cmd->rnw && cmd->len > 255) {
> +			dev_err(master->dev, "only support read less than 255 each xfer\n");

What would be the end user action upon seeing this message? Is it actually
useful?

> +			return -EINVAL;
> +		}
>  	}
>  
>  	mutex_lock(&master->lock);
> -- 
> 2.34.1
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ