From: Simon Horman <horms@kernel.org>
To: kovalev@altlinux.org
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, jiri@resnulli.us,
jacob.e.keller@intel.com, johannes@sipsolutions.net,
idosch@nvidia.com, David Lebrun <david.lebrun@uclouvain.be>,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: Re: [PATCH] genetlink: fix potencial use-after-free and null-ptr-deref in genl_dumpit()
Date: Tue, 20 Feb 2024 13:02:06 +0000 [thread overview]
Message-ID: <20240220130206.GH40273@kernel.org> (raw)
In-Reply-To: <4462f60e-63eb-c566-818a-98523ca4d4ff@basealt.ru>
On Mon, Feb 19, 2024 at 03:15:52PM +0300, kovalev@altlinux.org wrote:
> + Pablo Neira Ayuso <pablo@netfilter.org>
>
> 19.02.2024 14:32, Simon Horman wrote:
> > + Jiri Pirko <jiri@resnulli.us>
> > David Lebrun <david.lebrun@uclouvain.be>
> >
> > On Thu, Feb 15, 2024 at 11:23:09PM +0300, kovalev@altlinux.org wrote:
> > > From: Vasiliy Kovalev <kovalev@altlinux.org>
> > >
> > > The pernet operations structure for the subsystem must be registered
> > > before registering the generic netlink family.
> > >
> > > Fixes: 134e63756d5f ("genetlink: make netns aware")
> > Hi Vasiliy,
> >
> > A Fixes tag implies that this is a bug fix.
> > So I think some explanation is warranted of what, user-visible,
> > problem this resolves.
> >
> > In that case the patch should be targeted at net.
> > Which means it should be based on that tree and have a net annotation
> > in the subject
> >
> > Subject: [PATCH net] ...
> >
> > Alternatively, the Fixes tag should be dropped and some explanation
> > should be provided of why the structure needs to be registered before
> > the family.
> >
> > In this case, if you wish to refer to the patch where the problem (but not
> > bug) was introduced you can use something like the following.
> > It is just the Fixes tag that has a special meaning.
> >
> > Introduced in 134e63756d5f ("genetlink: make netns aware")
> >
> > I think the above comments also apply to:
> >
> > - [PATCH] ipv6: sr: fix possible use-after-free and null-ptr-deref
> > https://lore.kernel.org/all/20240215202717.29815-1-kovalev@altlinux.org/
> >
> > - [PATCH] devlink: fix possible use-after-free and memory leaks in devlink_init()
> > https://lore.kernel.org/all/20240215203400.29976-1-kovalev@altlinux.org/
> >
> > And as these patches seem to try to fix the same problem in different
> > places, all under Networking, I would suggest that if you do repost,
> > they are combined into a patch series (3 patches in the same series).
> >
> > But I do wonder, how such an apparently fundamental problem has been
> > present for so long in what I assume to be well exercised code.
>
> Hi Simon,
>
> The history of these changes began with the crash fix in the gtp module [1]
>
> A solution to the problem was found [2] and Pablo Neruda Ayuso suggested
> fixing similar
>
> sections of code if they might have the same problem.
>
> I have sent patches, but do not have reproducers, relying on drawing
> attention to the problem.
Thanks Vasiliy,
I think it would be worth adding some text along those lines to
the commit messages for the patches you have posted.
>
>
> [1]
> https://lore.kernel.org/lkml/20240124101404.161655-1-kovalev@altlinux.org/T/
>
> [2] https://lore.kernel.org/netdev/20240214162733.34214-1-kovalev@altlinux.org/T/#u
>
> --
> Thanks,
> Vasiliy Kovalev
>
prev parent reply other threads:[~2024-02-20 13:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 20:23 [PATCH] genetlink: fix potencial use-after-free and null-ptr-deref in genl_dumpit() kovalev
2024-02-19 11:32 ` Simon Horman
2024-02-19 12:15 ` kovalev
2024-02-20 13:02 ` Simon Horman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240220130206.GH40273@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=david.lebrun@uclouvain.be \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=jacob.e.keller@intel.com \
--cc=jiri@resnulli.us \
--cc=johannes@sipsolutions.net \
--cc=kovalev@altlinux.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.