From: Al Viro <viro@ZenIV.linux.org.uk>
To: Joe Korty <joe.korty@ccur.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix kfree bug in sendmsg and recvmsg
Date: Wed, 17 Feb 2016 16:44:07 +0000 [thread overview]
Message-ID: <20160217164407.GL17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160217163805.GA15781@zipoli.ccur.com>
On Wed, Feb 17, 2016 at 11:38:05AM -0500, Joe Korty wrote:
> Fix kfree bug in recvmsg and sendmsg.
>
> We cannot kfree(iov) when iov points to an array on the
> stack, as that has the potential of corrupting memory.
>
> So re-introduce the if-stmt that used to protect kfree
> from this condition, code that was removed as part of
> a larger set of changes made by git commit da184284.
NAK. You are misreading import_iovec():
*iov = p == *iov ? NULL : p;
in the end will have iov replaced with NULL if we ended up using what
it originally pointed to.
next prev parent reply other threads:[~2016-02-17 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 16:38 [PATCH] Fix kfree bug in sendmsg and recvmsg Joe Korty
2016-02-17 16:44 ` Al Viro [this message]
2016-02-17 16:52 ` Al Viro
2016-02-17 18:29 ` 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=20160217164407.GL17997@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=davem@davemloft.net \
--cc=joe.korty@ccur.com \
--cc=linux-kernel@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).