summaryrefslogtreecommitdiff
path: root/devel/gdb/patches/patch-aq
diff options
context:
space:
mode:
Diffstat (limited to 'devel/gdb/patches/patch-aq')
-rw-r--r--devel/gdb/patches/patch-aq15
1 files changed, 15 insertions, 0 deletions
diff --git a/devel/gdb/patches/patch-aq b/devel/gdb/patches/patch-aq
new file mode 100644
index 00000000000..8914a8e5a21
--- /dev/null
+++ b/devel/gdb/patches/patch-aq
@@ -0,0 +1,15 @@
+$NetBSD: patch-aq,v 1.1 2007/07/03 12:41:18 lkundrak Exp $
+
+Patch for CVE-2005-1705 from Gentoo #88398.
+
+--- gdb/main.c.orig 2002-09-28 17:10:31.000000000 +0200
++++ gdb/main.c
+@@ -626,7 +626,7 @@ extern int gdbtk_test (char *);
+
+ if (!homedir
+ || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
+- if (!inhibit_gdbinit)
++ if (!inhibit_gdbinit && (cwdbuf.st_uid == getuid()) && (!cwdbuf.st_mode & (S_IWOTH)))
+ {
+ catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL);
+ }