From: Andrew Morton <akpm@osdl.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Akinobu Mita <mita@miraclelinux.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] fix use after free in netlink_kernel_create()
Date: Sun, 13 Aug 2006 10:44:05 -0700 [thread overview]
Message-ID: <20060813104405.a5c8db00.akpm@osdl.org> (raw)
In-Reply-To: <44DF129A.6060607@trash.net>
On Sun, 13 Aug 2006 13:52:58 +0200
Patrick McHardy <kaber@trash.net> wrote:
> Akinobu Mita wrote:
> > This patch invalidates nl_table by setting NULL when netlink
> > initialization failed. Otherwise netlink_kernel_create() would
> > access nl_table which has already been freed.
>
>
> Quite a few users of netlink_kernel_create will panic when creating
> the socket fails (rtnetlink for example, which is always present),
> so you might as well call panic here directly.
That's a bit lame. Panicing at do_initcalls() time is OK (something is
seriously screwed anyway) but we usually try to handle the ENOMEM nicely if
it happens at modprobe-time.
(It's all pretty theoretical anyway - reasonable-sized GFP_KERNEL
allocations don't fail).
next prev parent reply other threads:[~2006-08-13 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-13 10:15 [PATCH] fix use after free in netlink_kernel_create() Akinobu Mita
2006-08-13 11:52 ` Patrick McHardy
2006-08-13 17:44 ` Andrew Morton [this message]
2006-08-13 18:49 ` Patrick McHardy
2006-08-14 4:02 ` 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=20060813104405.a5c8db00.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mita@miraclelinux.com \
--cc=netdev@vger.kernel.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).