Thread (3 messages) flat view 3 messages, 3 authors, 2021-10-25

Re: [PATCH net] net-sysfs: initialize uid and gid before calling net_ns_get_ownership

From: Christian Brauner <hidden>
Date: 2021-10-25 08:46:11

On Mon, Oct 25, 2021 at 02:31:48AM -0400, Xin Long wrote:
Currently in net_ns_get_ownership() it may not be able to set uid or gid
if make_kuid or make_kgid returns an invalid value, and an uninit-value
issue can be triggered by this.

This patch is to fix it by initializing the uid and gid before calling
net_ns_get_ownership(), as it does in kobject_get_ownership()

Fixes: e6dee9f3893c ("net-sysfs: add netdev_change_owner()")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
Looks good,
Acked-by: Christian Brauner <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help