lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081121160744.17135.78532.stgit@warthog.procyon.org.uk>
Date:	Fri, 21 Nov 2008 16:07:44 +0000
From:	David Howells <dhowells@...hat.com>
To:	torvalds@...l.org, akpm@...ux-foundation.org
Cc:	dhowells@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH] FRV: Fix error handling in is_user_addr_valid()

Fix error handling in is_user_addr_valid() in NOMMU mode to check whether
find_vma() actually worked or not.  This checks whether ptrace() is allowed to
access an address.

Signed-off-by: David Howells <dhowells@...hat.com>
---

 arch/frv/kernel/ptrace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index e9af8de..5e7d401 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -83,7 +83,7 @@ static inline int is_user_addr_valid(struct task_struct *child,
 	struct vm_area_struct *vma;
 
 	vma = find_vma(child->mm, start);
-	if (start >= vma->vm_start && start + len <= vma->vm_end)
+	if (vma && start >= vma->vm_start && start + len <= vma->vm_end)
 		return 0;
 
 	return -EIO;

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ