From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: George Spelvin <linux@sciencehorizons.net>
Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org,
kirill.shutemov@linux.intel.com, linux-mm@kvack.org,
mgorman@techsingularity.net, riel@surriel.com
Subject: Re: A use case for MAP_COPY
Date: Fri, 6 Jan 2017 01:14:22 +0300 [thread overview]
Message-ID: <20170105221422.GB27928@node.shutemov.name> (raw)
In-Reply-To: <20170105211056.18340.qmail@ns.sciencehorizons.net>
On Thu, Jan 05, 2017 at 04:10:56PM -0500, George Spelvin wrote:
> It just has to be less of a DoS attack than MAP_DENYWRITE.
It's easy to turn MAP_COPY into DoS:
- in endless loop: mmap(MAP_COPY|MAP_FIXED) a victim file 1000 times (by
distinct addresses) into your address space;
- any attempt to write to the file would require to go through all
mapping and put new page in every one;
- by the time you've done with all 1000 VMAs, attacker created new bunch
for you.
There's no way to guarantee it would ever complete (nasty hacks into
scheduler don't count).
--
Kirill A. Shutemov
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-01-05 22:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 6:37 George Spelvin
2017-01-05 18:59 ` Linus Torvalds
2017-01-05 21:10 ` George Spelvin
2017-01-05 22:14 ` Kirill A. Shutemov [this message]
2017-01-05 22:49 ` Linus Torvalds
2017-01-06 1:08 ` George Spelvin
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=20170105221422.GB27928@node.shutemov.name \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=linux@sciencehorizons.net \
--cc=mgorman@techsingularity.net \
--cc=riel@surriel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox