From: kovalev@altlinux.org
To: Eric Dumazet <edumazet@google.com>
Cc: pablo@netfilter.org, laforge@gnumonks.org, davem@davemloft.net,
kuba@kernel.org, pabeni@redhat.com,
osmocom-net-gprs@lists.osmocom.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, nickel@altlinux.org,
oficerovas@altlinux.org, dutyrok@altlinux.org
Subject: Re: [PATCH 1/1] gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
Date: Wed, 14 Feb 2024 19:50:51 +0300 [thread overview]
Message-ID: <6cbbecf1-eba1-f3e1-259a-24df71f44785@basealt.ru> (raw)
In-Reply-To: <CANn89iJ4hVyRHiZXWTiW9ftyN8PFDaWiZnzE7GVAzu1dT78Daw@mail.gmail.com>
09.02.2024 22:21, Eric Dumazet wrote:
> Maybe, but the patch is not good, I think I and Pablo gave feedback on this ?
>
> Please trace __netlink_dump_start() content of control->module
>
> gtp_genl_family.module should be set, and we should get it.
>
> Otherwise, if the bug is in the core, we would need a dozen of 'work
> arounds because it is better than nothing'
>
> Thank you.
Thanks.
I tracked the moment when the __netlink_dump_start() function was
called, it turned out that in the gtp_init() initialization function
before registering pernet subsystem (gtp_net_ops), therefore, outdated
data is used, which leads to a crash.
The documentation says that ops structure must be assigned before
registering a generic netlink family [1].
I have fixed and sent a new patch [2].
[1]
https://elixir.bootlin.com/linux/v6.8-rc4/source/net/netlink/genetlink.c#L773
[2]
https://lore.kernel.org/netdev/20240214162733.34214-1-kovalev@altlinux.org/T/#u
--
Regards,
Vasiliy Kovalev
next prev parent reply other threads:[~2024-02-14 16:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 10:14 [PATCH 0/1] gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp() kovalev
2024-01-24 10:14 ` [PATCH 1/1] " kovalev
2024-01-24 10:42 ` Eric Dumazet
2024-01-24 10:57 ` Eric Dumazet
2024-01-24 11:20 ` kovalev
2024-01-24 11:52 ` Eric Dumazet
2024-02-09 18:16 ` kovalev
2024-02-09 19:21 ` Eric Dumazet
2024-02-14 16:50 ` kovalev [this message]
2024-02-15 20:32 ` Eric Dumazet
2024-01-29 12:02 ` Pablo Neira Ayuso
2024-01-29 16:53 ` kovalev
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=6cbbecf1-eba1-f3e1-259a-24df71f44785@basealt.ru \
--to=kovalev@altlinux.org \
--cc=davem@davemloft.net \
--cc=dutyrok@altlinux.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nickel@altlinux.org \
--cc=oficerovas@altlinux.org \
--cc=osmocom-net-gprs@lists.osmocom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).