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: <CAFEp6-15L291Ae1zbon=cD-iaQ-4RbVZNW42KUHx4G7KRP8Mdw@mail.gmail.com>
Date: Tue, 30 Dec 2025 09:31:32 +0100
From: Loic Poulain <loic.poulain@....qualcomm.com>
To: Zilin Guan <zilin@....edu.cn>
Cc: ryazanov.s.a@...il.com, johannes@...solutions.net, andrew+netdev@...n.ch,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Jianhao Xu <jianhao.xu@....edu.cn>
Subject: Re: [PATCH net] net: wwan: iosm: Fix memory leak in ipc_mux_deinit()

On Tue, Dec 30, 2025 at 8:19 AM Zilin Guan <zilin@....edu.cn> wrote:
>
> Commit 1f52d7b62285 ("net: wwan: iosm: Enable M.2 7360 WWAN card support")
> allocated memory for pp_qlt in ipc_mux_init() but did not free it in
> ipc_mux_deinit(). This results in a memory leak when the driver is
> unloaded.
>
> Free the allocated memory in ipc_mux_deinit() to fix the leak.
>
> Fixes: 1f52d7b62285 ("net: wwan: iosm: Enable M.2 7360 WWAN card support")
> Co-developed-by: Jianhao Xu <jianhao.xu@....edu.cn>
> Signed-off-by: Jianhao Xu <jianhao.xu@....edu.cn>
> Signed-off-by: Zilin Guan <zilin@....edu.cn>

Reviewed-by: Loic Poulain <loic.poulain@....qualcomm.com>

> ---
>  drivers/net/wwan/iosm/iosm_ipc_mux.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux.c b/drivers/net/wwan/iosm/iosm_ipc_mux.c
> index fc928b298a98..b846889fcb09 100644
> --- a/drivers/net/wwan/iosm/iosm_ipc_mux.c
> +++ b/drivers/net/wwan/iosm/iosm_ipc_mux.c
> @@ -456,6 +456,7 @@ void ipc_mux_deinit(struct iosm_mux *ipc_mux)
>         struct sk_buff_head *free_list;
>         union mux_msg mux_msg;
>         struct sk_buff *skb;
> +       int i;
>
>         if (!ipc_mux->initialized)
>                 return;
> @@ -479,5 +480,10 @@ void ipc_mux_deinit(struct iosm_mux *ipc_mux)
>                 ipc_mux->channel->dl_pipe.is_open = false;
>         }
>
> +       if (ipc_mux->protocol != MUX_LITE) {
> +               for (i = 0; i < IPC_MEM_MUX_IP_SESSION_ENTRIES; i++)
> +                       kfree(ipc_mux->ul_adb.pp_qlt[i]);
> +       }
> +
>         kfree(ipc_mux);
>  }
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ