From: Arun Sharma <arun.sharma@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Security issue with Linux/IA-64
Date: Tue, 09 Jul 2002 21:03:13 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590701905749@msgid-missing> (raw)
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
I found that running the following program as an unprivileged user on
Linux/IA-64 could hang the system.
#include <unistd.h>
#include <sys/mman.h>
int main(int argc, char **argv)
{
munmap( (void *) 0x2000000000000000L, 0x2000000000000000L - 1);
}
The attached patch fixes the problem. We recommend that distributions
pick this up as soon as possible, because of the nature of the problem.
-Arun
[-- Attachment #2: flush7.txt --]
[-- Type: text/plain, Size: 978 bytes --]
===== include/asm-ia64/pgalloc.h 1.6 vs edited =====
--- 1.6/include/asm-ia64/pgalloc.h Fri Jun 21 16:18:11 2002
+++ edited/include/asm-ia64/pgalloc.h Tue Jul 9 13:55:27 2002
@@ -17,6 +17,7 @@
#include <linux/mm.h>
#include <linux/threads.h>
+#include <linux/compiler.h>
#include <asm/mmu_context.h>
#include <asm/processor.h>
@@ -204,9 +205,15 @@
static inline void
flush_tlb_pgtables (struct mm_struct *mm, unsigned long start, unsigned long end)
{
- if (rgn_index(start) != rgn_index(end))
- printk("flush_tlb_pgtables: can't flush across regions!!\n");
- flush_tlb_range(mm, ia64_thash(start), ia64_thash(end));
+ if (unlikely(end - start >= 1024*1024*1024*1024UL
+ || rgn_index(start) != rgn_index(end - 1)))
+ /*
+ * This condition is very rare and normal applications shouldn't get
+ * here. No attempt has been made to optimize for this case.
+ */
+ flush_tlb_all();
+ else
+ flush_tlb_range(mm, ia64_thash(start), ia64_thash(end));
}
/*
reply other threads:[~2002-07-09 21:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-105590701905749@msgid-missing \
--to=arun.sharma@intel.com \
--cc=linux-ia64@vger.kernel.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