My Linux and Open Source Software Penguin Logo Linux and Open Source News and Reviews
The Hungry Penguin
Linux & Me Blog    My Linux Blog (Archived)    What is Linux?    What is Open Source?

Sidebar

Open Source and the London Olympics



Dedicated Servers

[PATCH] x86/ldt: Off by one in get_segment_base()

Click here for the complete article (lkml.org)
Dan Carpenter writes: (Summary) It has ldt->nr_entries elements and ldt->nr_entries is capped at LDT_ENTRIES. diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index af12e294caed..939050169d12 100644 --- a/arch/x86/events/core.c +++ b/arch/x86/events/core.c @@ -2335,12 +2335,9 @@ static unsigned long get_segment_base(unsigned int segment) #ifdef CONFIG_MODIFY_LDT_SYSCALL struct ldt_struct *ldt; LDT_ENTRIES) - return 0; idx >= ldt->nr_entries) return 0; #endif } else { - if (idx > GDT_ENTRIES) + if (idx >= GDT_ENTRIES) return 0;

Linux News | Linux Articles | Linux Distributions | Linux Apps | Linux Kernel | Free Linux Download | Linux & Me Blog
Free Press Release Service | Bible Study Tool | New Covenant Workshop | Gary Sims
Press Releases and SEO

The original content of these pages (not the syndicated items) is licensed under a Creative Commons License.
News and media about the Linux operating system, open source software, Unix, Apache, LAMP, PHP, RSS, GNU and much more.