From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] vfs: reject inodes with negative size to prevent kernel hang
Date: Sat, 10 Dec 2016 01:59:00 +0000 [thread overview]
Message-ID: <20161210015859.GF1555@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20161207003222.GI16807@birch.djwong.org>
On Tue, Dec 06, 2016 at 04:32:22PM -0800, Darrick J. Wong wrote:
> Due to insufficient input validation, various filesystem drivers can
> load an inode with a negative size from a maliciously crafted fs image.
> If this happens, a subsequent write-append operation can cause integer
> overflows in the writeback code, causing the kernel to lock up.
>
> Therefore, if we catch anyone trying to link a dentry to a garbage
> inode, reject the whole attempt.
Yecchh... This is completely wrong place for such checks. Sorry,
NAK. The set of spots chosen for those tests is random *and* it's
not even sufficient (consider e.g. d_obtain_alias()). The things
go wrong when such inode is set up, not when a dentry is attached
to it.
prev parent reply other threads:[~2016-12-10 1:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 0:32 [PATCH] vfs: reject inodes with negative size to prevent kernel hang Darrick J. Wong
2016-12-07 3:54 ` kbuild test robot
2016-12-08 6:10 ` Darrick J. Wong
2016-12-10 1:59 ` Al Viro [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=20161210015859.GF1555@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=darrick.wong@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.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.