Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/linux/arch/powerpc Fixed a potential security pro...



details:   https://anonhg.NetBSD.org/src/rev/695c6cb42d61
branches:  trunk
changeset: 510409:695c6cb42d61
user:      manu <manu%NetBSD.org@localhost>
date:      Mon May 28 10:51:20 2001 +0000

description:
Fixed a potential security problem (copyout after an error)

diffstat:

 sys/compat/linux/arch/powerpc/linux_ptrace.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 9f383fc5b11d -r 695c6cb42d61 sys/compat/linux/arch/powerpc/linux_ptrace.c
--- a/sys/compat/linux/arch/powerpc/linux_ptrace.c      Mon May 28 08:41:37 2001 +0000
+++ b/sys/compat/linux/arch/powerpc/linux_ptrace.c      Mon May 28 10:51:20 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_ptrace.c,v 1.5 2001/05/27 21:15:07 manu Exp $ */
+/*     $NetBSD: linux_ptrace.c,v 1.6 2001/05/28 10:51:20 manu Exp $ */
 
 /*-
  * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -304,9 +304,13 @@
 
                PRELE(t);
 
+               if (error)
+                       goto out;
+
                error = copyout (retval, 
                    (caddr_t)SCARG(uap, data), sizeof retval);
                *retval = SCARG(uap, data);
+
                goto out;
 
                break;



Home | Main Index | Thread Index | Old Index