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]
Date:   Wed, 8 Jun 2022 17:26:40 +0100
From:   Cristian Marussi <cristian.marussi@....com>
To:     Peter Hilber <peter.hilber@...nsynergy.com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        sudeep.holla@....com
Subject: Re: [PATCH 2/3] firmware: arm_scmi: Fix SENSOR_AXIS_NAME_GET
 behaviour when unsupported

On Wed, Jun 08, 2022 at 05:19:02PM +0200, Peter Hilber wrote:
> Hi Cristian,
> 
> I think I found two missing endianness conversions, see below.
> 
> Best regards,
> 
> Peter

[snip]

> > @@ -393,12 +398,14 @@ iter_axes_desc_process_response(const struct scmi_protocol_handle *ph,
> >  	u32 attrh, attrl;
> >  	struct scmi_sensor_axis_info *a;
> >  	size_t dsize = SCMI_MSG_RESP_AXIS_DESCR_BASE_SZ;
> > -	struct scmi_sensor_info *s = priv;
> > +	struct scmi_apriv *apriv = priv;
> >  	const struct scmi_axis_descriptor *adesc = st->priv;
> >  
> >  	attrl = le32_to_cpu(adesc->attributes_low);
> > +	if (SUPPORTS_EXTENDED_AXIS_NAMES(attrl))
> > +		apriv->any_axes_support_extended_names = true;
> >  
> > -	a = &s->axis[st->desc_index + st->loop_idx];
> > +	a = &apriv->s->axis[st->desc_index + st->loop_idx];
> >  	a->id = le32_to_cpu(adesc->id);
> >  	a->extended_attrs = SUPPORTS_EXTEND_ATTRS(attrl);
> >  
> > @@ -444,10 +451,18 @@ iter_axes_extended_name_process_response(const struct scmi_protocol_handle *ph,
> >  					 void *priv)
> >  {
> >  	struct scmi_sensor_axis_info *a;
> > -	const struct scmi_sensor_info *s = priv;
> > +	const struct scmi_apriv *apriv = priv;
> >  	struct scmi_sensor_axis_name_descriptor *adesc = st->priv;
> >  
> > -	a = &s->axis[st->desc_index + st->loop_idx];
> > +	if (adesc->axis_id >= st->max_resources)
> 
> I think adesc->axis_id uses in this function need to be wrapped with
> le32_to_cpu() (here and below as well).
> 

...damn, my bad ... I'm posting a V2.

Thanks for the review !

Cristian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ