public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-fs/multipath-tools/files: multipath-tools-0.4.8-socket-cve-2009-0115.patch
@ 2009-10-30  7:01 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; only message in thread
From: Robin H. Johnson (robbat2) @ 2009-10-30  7:01 UTC (permalink / raw
  To: gentoo-commits

robbat2     09/10/30 07:01:35

  Added:                multipath-tools-0.4.8-socket-cve-2009-0115.patch
  Log:
  Missed one more patch, bug #264564, fix for CVE-2009-0115.
  (Portage version: 2.2_rc46/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-fs/multipath-tools/files/multipath-tools-0.4.8-socket-cve-2009-0115.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-tools-0.4.8-socket-cve-2009-0115.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/multipath-tools/files/multipath-tools-0.4.8-socket-cve-2009-0115.patch?rev=1.1&content-type=text/plain

Index: multipath-tools-0.4.8-socket-cve-2009-0115.patch
===================================================================
From: Hannes Reinecke <hare@suse.de>
Date: Wed, 1 Apr 2009 20:31:01 +0000 (+0200)
Subject: [multipathd] /var/run/multipathd.sock is world-writable
X-Git-Url: http://git.kernel.org/gitweb.cgi?p=linux%2Fstorage%2Fmultipath-tools%2F.git;a=commitdiff_plain;h=0a0319d381249760c71023edbe0ac9c093bb4a74;hp=15d4bdddcb9b71e0ec6fecc3c37a1b8cae8f51ff

[multipathd] /var/run/multipathd.sock is world-writable

Due to an stray 'umask()' the socket file is in fact world-writable,
allowing for an easy exploit.

References: 458598
---

diff --git a/multipathd/main.c b/multipathd/main.c
index 8a1a63d..9957f1f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1454,8 +1454,9 @@ daemonize(void)
 
 	close(in_fd);
 	close(out_fd);
-	chdir("/");
-	umask(0);
+	if (chdir("/") < 0)
+		fprintf(stderr, "cannot chdir to '/', continuing\n");
+
 	return 0;
 }
 






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-10-30  7:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-30  7:01 [gentoo-commits] gentoo-x86 commit in sys-fs/multipath-tools/files: multipath-tools-0.4.8-socket-cve-2009-0115.patch Robin H. Johnson (robbat2)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox