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] [day] [month] [year] [list]
Message-ID: <c99dca8e-1628-b3ef-3ca1-09a4e10e6981@linux.intel.com>
Date: Mon, 15 May 2023 12:06:05 +0530
From: "Kumar, M Chetan" <m.chetan.kumar@...ux.intel.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: netdev@...r.kernel.org, kuba@...nel.org, davem@...emloft.net,
 johannes@...solutions.net, ryazanov.s.a@...il.com, loic.poulain@...aro.org,
 linuxwwan@...el.com, m.chetan.kumar@...el.com, edumazet@...gle.com,
 pabeni@...hat.com, Samuel Wein PhD <sam@...wein.com>
Subject: Re: [PATCH net] net: wwan: iosm: fix NULL pointer dereference when
 removing device


On 5/12/2023 10:35 PM, Simon Horman wrote:
> On Thu, May 11, 2023 at 03:34:44PM +0530, m.chetan.kumar@...ux.intel.com wrote:
>> From: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
>>
>> In suspend and resume cycle, the removal and rescan of device ends
>> up in NULL pointer dereference.
>>
>> During driver initialization, if the ipc_imem_wwan_channel_init()
>> fails to get the valid device capabilities it returns an error and
>> further no resource (wwan struct) will be allocated. Now in this
>> situation if driver removal procedure is initiated it would result
>> in NULL pointer exception since unallocated wwan struct is dereferenced
>> inside ipc_wwan_deinit().
>>
>> ipc_imem_run_state_worker() to handle the called functions return value
>> and to release the resource in failure case. It also reports the link
>> down event in failure cases. The user space application can handle this
>> event to do a device reset for restoring the device communication.
>>
>> Fixes: 3670970dd8c6 ("net: iosm: shared memory IPC interface")
>> Reported-by: Samuel Wein PhD <sam@...wein.com>
>> Closes: https://lore.kernel.org/netdev/20230427140819.1310f4bd@kernel.org/T/
>> Signed-off-by: M Chetan Kumar <m.chetan.kumar@...ux.intel.com>
> 

<skip>

> err_out:
> 	ipc_mux_deinit(ipc_imem->mux);
> 	ipc_uevent_send(ipc_imem->dev, UEVENT_CD_READY_LINK_DOWN);
> 
>>   }

Thank you for reviewing the patch and sharing the feedback.
I will post the v2 with the above suggested changes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ