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: <20250417070937.332dc7d4@kernel.org>
Date: Thu, 17 Apr 2025 07:09:37 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Taehee Yoo <ap420073@...il.com>
Cc: Stanislav Fomichev <stfomichev@...il.com>, Mina Almasry
 <almasrymina@...gle.com>, davem@...emloft.net, pabeni@...hat.com,
 edumazet@...gle.com, andrew+netdev@...n.ch, horms@...nel.org,
 asml.silence@...il.com, dw@...idwei.uk, sdf@...ichev.me,
 skhawaja@...gle.com, simona.vetter@...ll.ch, kaiyuanz@...gle.com,
 netdev@...r.kernel.org
Subject: Re: [PATCH net] net: devmem: fix kernel panic when socket close
 after module unload

On Thu, 17 Apr 2025 15:57:47 +0900 Taehee Yoo wrote:
> Thanks Mina for the suggestion!
> What I would like to do is like that
> If binding->dev is NULL, it skips locking, but it still keeps calling
> net_devmem_unbind_dmabuf().

note that the current code in net_devmem_unbind_dmabuf() is also not
safe against double removal from the socket list.

> Calling net_devmem_unbind_dmabuf() is safe even if after module unload,
> because binding->bound_rxq is deleted by the uninstall path.
> If bound_rxq is empty, binding->dev will not be accessed.
> The only uninstall side code change is to set binding->dev to NULL and
> add priv->lock.
> This approach was already suggested by Stanislav earlier in this thread.

> Mina, Stanislav, and Jakub, can you confirm this?

Maybe just send the code, even if it's not perfect. It's a bit hard 
to track all the suggested changes :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ