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: <CALs4sv2Eqx7On04w15WnFw9pDkeeF1DRAoVD5aFjTyHpbzD1GA@mail.gmail.com>
Date: Fri, 26 Sep 2025 22:53:34 +0530
From: Pavan Chebbi <pavan.chebbi@...adcom.com>
To: Dave Jiang <dave.jiang@...el.com>
Cc: jgg@...pe.ca, michael.chan@...adcom.com, saeedm@...dia.com, 
	Jonathan.Cameron@...wei.com, davem@...emloft.net, corbet@....net, 
	edumazet@...gle.com, gospo@...adcom.com, kuba@...nel.org, 
	netdev@...r.kernel.org, pabeni@...hat.com, andrew+netdev@...n.ch, 
	selvin.xavier@...adcom.com, leon@...nel.org, 
	kalesh-anakkur.purayil@...adcom.com
Subject: Re: [PATCH net-next v3 4/5] bnxt_fwctl: Add bnxt fwctl device

On Fri, Sep 26, 2025 at 10:41 PM Pavan Chebbi <pavan.chebbi@...adcom.com> wrote:
>
> On Fri, Sep 26, 2025 at 9:31 PM Dave Jiang <dave.jiang@...el.com> wrote:
> >
> >
> >
>
> > > +     if (msg->num_dma) {
> > > +             if (msg->num_dma > MAX_NUM_DMA_INDICATIONS) {
> > > +                     dev_err(dev, "DMA buffers exceed the number supported\n");
> > > +                     err = -EINVAL;
> > > +                     goto free_msg_out;
> >
> > Shouldn't rpc_in.resp get freed with an error returned? It's leaking rpc_in.resp on all the error paths from this point onward.
> >
> > DJ
>
> Isn't the caller taking care of it? The fw_rpc is called as:
> void *outbuf __free(kvfree) = fwctl->ops->fw_rpc()
> I was expecting that outbuf will be freed once it goes out of scope,
> regardless of success or error?

Oh, the buffer is not returned when there is an error :( I should have
seen that.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5469 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ