diff options
author | Linus Torvalds | 2019-04-11 10:49:19 -0700 |
---|---|---|
committer | Linus Torvalds | 2019-04-14 10:00:04 -0700 |
commit | 8fde12ca79aff9b5ba951fce1a2641901b8d8e64 (patch) | |
tree | 23ee93c180e690ccd12257fb677fa9b40e1be53a /crypto/lzo.c | |
parent | 88b1a17dfc3ed7728316478fae0f5ad508f50397 (diff) |
mm: prevent get_user_pages() from overflowing page refcount
If the page refcount wraps around past zero, it will be freed while
there are still four billion references to it. One of the possible
avenues for an attacker to try to make this happen is by doing direct IO
on a page multiple times. This patch makes get_user_pages() refuse to
take a new page reference if there are already more than two billion
references to the page.
Reported-by: Jann Horn <jannh@google.com>
Acked-by: Matthew Wilcox <willy@infradead.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto/lzo.c')
0 files changed, 0 insertions, 0 deletions