From: Mateusz Guzik <mguzik@redhat.com>
To: "Wang, Xiaoming" <xiaoming.wang@intel.com>
Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
yoshfuji@linux-ipv6.org, kaber@trash.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, chuansheng.liu@intel.com,
dongxing.zhang@intel.com
Subject: Re: [PATCH] net: ipv4: current group_info should be put after using.
Date: Fri, 11 Apr 2014 15:50:27 +0200 [thread overview]
Message-ID: <20140411135027.GF15546@mguzik.redhat.com> (raw)
In-Reply-To: <1397271201.2575.4.camel@wxm-ubuntu>
On Fri, Apr 11, 2014 at 10:53:21PM -0400, Wang, Xiaoming wrote:
> This is a typical refcount leak exploitable by unprivileged users.
> Current group_info had been got in ping_init_sock and
> group_info->usage increased. But the usage hasn't decreased
> anywhere in ping. This will make this group_info never freed.
>
The patch is fine, however I had a brainfart with my last sentence about
commit message, sorry for that.
group_info *can be freed* by malicious user while still being pointed to
by something, that's the biggest problem with refcount leaks, therefore
this message needs some reworking.
I think that discussion about various consequences of refcount leak in
commit message is not necessary.
how about:
Plug a group_info refcount leak in ping_init.
group_info is only needed during initialization and the code failed to
release the reference on exit.
While here move grabbing the reference to a place where it is actually
needed.
====
Please cc: me if you resend the patch.
Thanks,
--
Mateusz Guzik
next prev parent reply other threads:[~2014-04-11 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-12 2:53 [PATCH] net: ipv4: current group_info should be put after using Wang, Xiaoming
2014-04-11 13:50 ` Mateusz Guzik [this message]
2014-04-12 20:57 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2014-04-14 16:30 Wang, Xiaoming
2014-04-14 2:54 ` David Miller
2014-05-11 21:55 ` Mateusz Guzik
2014-04-11 17:37 Wang, Xiaoming
2014-04-11 8:35 ` Mateusz Guzik
2014-04-11 13:33 ` Mateusz Guzik
2014-04-11 16:10 Wang, Xiaoming
2014-04-11 3:11 ` David Miller
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=20140411135027.GF15546@mguzik.redhat.com \
--to=mguzik@redhat.com \
--cc=chuansheng.liu@intel.com \
--cc=davem@davemloft.net \
--cc=dongxing.zhang@intel.com \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiaoming.wang@intel.com \
--cc=yoshfuji@linux-ipv6.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.