From: Sasha Levin <sasha.levin@oracle.com>
To: Al Viro <viro@ZenIV.linux.org.uk>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
willy@linux.intel.com
Cc: Chuck Ebbert <cebbert.lkml@gmail.com>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: fs: out of bounds on stack in iov_iter_advance
Date: Sat, 17 Oct 2015 15:22:19 -0400 [thread overview]
Message-ID: <56229FEB.2040501@oracle.com> (raw)
In-Reply-To: <560C5469.5010704@oracle.com>
On 09/30/2015 05:30 PM, Sasha Levin wrote:
> On 09/17/2015 10:24 PM, Sasha Levin wrote:
>> On 08/19/2015 01:46 AM, Al Viro wrote:
>>>> or mapping->a_ops->direct_IO() returned more
>>>>> than 'count'.
>>> Was there DAX involved? ->direct_IO() in there is blkdev_direct_IO(),
>>> which takes rather different paths in those cases...
>>>
>>
>> So I've traced this all the way back to dax_io(). I can trigger this with:
>>
>> diff --git a/fs/dax.c b/fs/dax.c
>> index 93bf2f9..2cdb8a5 100644
>> --- a/fs/dax.c
>> +++ b/fs/dax.c
>> @@ -178,6 +178,7 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
>> if (need_wmb)
>> wmb_pmem();
>>
>> + WARN_ON((pos == start) && (pos - start > iov_iter_count(iter)));
>> return (pos == start) ? retval : pos - start;
>> }
>>
>> So it seems that iter gets moved twice here: once in dax_io(), and once again
>> back at generic_file_read_iter().
>>
>> I don't see how it ever worked. Am I missing something?
>
> Ping?
Ping?
Thanks,
Sasha
next prev parent reply other threads:[~2015-10-17 19:22 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 14:13 fs: out of bounds on stack in iov_iter_advance Sasha Levin
2015-08-15 20:13 ` Chuck Ebbert
2015-08-17 9:18 ` Andrey Ryabinin
2015-08-19 5:46 ` Al Viro
2015-09-02 20:00 ` Sasha Levin
2015-09-18 2:24 ` Sasha Levin
2015-09-30 21:30 ` Sasha Levin
2015-10-17 19:22 ` Sasha Levin [this message]
2015-10-18 4:17 ` Ross Zwisler
2015-10-19 23:34 ` Sasha Levin
2015-11-06 1:34 ` Al Viro
2015-11-06 2:19 ` Al Viro
2015-11-06 3:38 ` Linus Torvalds
2015-11-06 16:06 ` Jens Axboe
2015-11-11 2:21 ` Linus Torvalds
2015-11-11 2:25 ` Jens Axboe
2015-11-11 2:31 ` Linus Torvalds
2015-11-11 2:40 ` Jens Axboe
2015-11-11 2:41 ` Jens Axboe
2015-11-11 2:44 ` Jens Axboe
2015-11-11 3:06 ` Al Viro
2015-11-11 3:07 ` Jens Axboe
2015-11-11 3:20 ` Sasha Levin
2015-11-11 2:56 ` Al Viro
2015-11-11 3:30 ` Al Viro
2015-11-11 4:36 ` Linus Torvalds
2015-11-11 7:43 ` Al Viro
2015-11-11 8:16 ` Stephen Rothwell
2015-11-11 10:19 ` Al Viro
2015-11-11 10:28 ` Stephen Rothwell
2015-11-11 16:25 ` Mike Marshall
2015-11-11 16:36 ` Al Viro
2015-11-11 16:56 ` Mike Marshall
2015-11-11 16:33 ` Al Viro
2015-11-11 21:47 ` Stephen Rothwell
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=56229FEB.2040501@oracle.com \
--to=sasha.levin@oracle.com \
--cc=cebbert.lkml@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ryabinin.a.a@gmail.com \
--cc=viro@ZenIV.linux.org.uk \
--cc=willy@linux.intel.com \
/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).