login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
February
»
12
Re: [PATCH] Avoid buffer overflows in get_user_pages()
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
Bodo Eggert <7eggert@...>
To: Andrew Morton <akpm@...>, Jonathan Corbet <corbet@...>, <linux-kernel@...>, <torvalds@...>
Subject:
Re: [PATCH] Avoid buffer overflows in get_user_pages()
Date: Tuesday, February 12, 2008 - 4:34 am
Andrew Morton <akpm@linux-foundation.org> wrote:
quoted text
> On Mon, 11 Feb 2008 16:17:33 -0700 Jonathan Corbet <corbet@lwn.net> wrote:
quoted text
>> Avoid buffer overflows in get_user_pages() >> >> So I spent a while pounding my head against my monitor trying to figure >> out the vmsplice() vulnerability - how could a failure to check for >> *read* access turn into a root exploit? It turns out that it's a buffer >> overflow problem which is made easy by the way get_user_pages() is >> coded. >> >> In particular, "len" is a signed int, and it is only checked at the >> *end* of a do {} while() loop. So, if it is passed in as zero, the loop >> will execute once and decrement len to -1. At that point, the loop will >> proceed until the next invalid address is found; in the process, it will >> likely overflow the pages array passed in to get_user_pages().
[...]
quoted text
> Can we just convert > > do { > ... > } while (len); > > into > > while (len) {
while (len > 0), if I understand this patch correctly. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [thread] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
Re: [PATCH] Avoid buffer overflows in get_user_pages()
, Bodo Eggert
, (Tue Feb 12, 4:34 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[patch 01/60] mlock() fix return values
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
Greg KH
[patch 11/62] KVM: VMX: Add ept_sync_context in flush_tlb
Joe Perches
[PATCH 014/148] include/asm-x86/checksum_32.h: checkpatch cleanups - formatting only
git
:
linux-netdev
:
David Miller
[GIT]: Networking
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Radu Rendec
Endianness problem with u32 classifier hash masks
Evgeniy Polyakov
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
1 user
and
1008 guests
online.
Online users
doj83hkjon
Syndicate