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: Mon, 3 Jun 2024 12:56:20 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Ekansh Gupta <quic_ekangupt@...cinc.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, 
	linux-arm-msm@...r.kernel.org, gregkh@...uxfoundation.org, quic_bkumar@...cinc.com, 
	linux-kernel@...r.kernel.org, quic_chennak@...cinc.com, stable <stable@...nel.org>
Subject: Re: [PATCH v3 2/9] misc: fastrpc: Fix DSP capabilities request

On Mon, Jun 03, 2024 at 12:35:40PM +0530, Ekansh Gupta wrote:
> 
> 
> On 5/31/2024 3:03 PM, Srinivas Kandagatla wrote:
> >
> >
> > On 30/05/2024 11:20, Ekansh Gupta wrote:
> >> Incorrect remote arguments are getting passed when requesting for
> >> capabilities from DSP. Also there is no requirement to update the
> >> PD type as it might cause problems for any PD other than user PD.
> >> In addition to this, the collected capability information is not
> >> getting copied properly to user. Add changes to address these
> >> problems and get correct DSP capabilities.
> >>
> >> Fixes: 6c16fd8bdd40 ("misc: fastrpc: Add support to get DSP capabilities")
> >> Cc: stable <stable@...nel.org>
> >> Signed-off-by: Ekansh Gupta <quic_ekangupt@...cinc.com>
> >> ---
> >>   drivers/misc/fastrpc.c | 7 +++----
> >>   1 file changed, 3 insertions(+), 4 deletions(-)
> >
> >
> >>       if (err == DSP_UNSUPPORTED_API) {
> >>           dev_info(&cctx->rpdev->dev,
> >>                "Warning: DSP capabilities not supported on domain: %d\n", domain);
> >> @@ -1783,7 +1782,7 @@ static int fastrpc_get_dsp_info(struct fastrpc_user *fl, char __user *argp)
> >>       if (err)
> >>           return err;
> >>   -    if (copy_to_user(argp, &cap.capability, sizeof(cap.capability)))
> >> +    if (copy_to_user(argp, &cap, sizeof(cap)))
> >
> > Why are we copying the full struct here? All that user needs is cap.capability?
> as argp sent from user during ioctl is the capability structure, the
> same argp is copied to a local fastrpc_ioctl_capability structure(cap)
> to get the domain and attribute_id information. Copying just the
> capability member to argp will cause problem when the user tries to
> read the capability. While testing the capability, I was observing
> this failure and it is resolved once we copy the information properly.

What kind of failure? Which problems? Why do we need to get all the
details from you by asking for more and more details. All this
information must be explained in the commit message.

[please wrap your lines in a some sensible way, I had to do that for you]

> >
> >
> >
> > --srini
> >
> >
> >>           return -EFAULT;
> >>         return 0;
> >
> 

-- 
With best wishes
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ