Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 177606 Details for
Bug 246013
<net-firewall/firehol-1.273-r1 symlink attack (CVE-2008-4953)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-Use-mktemp-instead-of-relying-that-RANDOM-RANDO.patch
0001-Use-mktemp-instead-of-relying-that-RANDOM-RANDO.patch (text/plain), 1.69 KB, created by
Robert Buchholz (RETIRED)
on 2009-01-06 22:28:51 UTC
(
hide
)
Description:
0001-Use-mktemp-instead-of-relying-that-RANDOM-RANDO.patch
Filename:
MIME Type:
Creator:
Robert Buchholz (RETIRED)
Created:
2009-01-06 22:28:51 UTC
Size:
1.69 KB
patch
obsolete
>From 545db8cd292957158bf3fa1c1c370e4be83c6688 Mon Sep 17 00:00:00 2001 >From: Robert Buchholz <rbu@goodpoint.de> >Date: Tue, 6 Jan 2009 23:26:00 +0100 >Subject: [PATCH] Use mktemp instead of relying that $$-$RANDOM-$RANDOM does not exist. > >References: >* CVE-2008-4953 >* https://bugs.gentoo.org/246013 >--- > firehol.sh | 25 +++++++++---------------- > 1 files changed, 9 insertions(+), 16 deletions(-) > >diff --git a/firehol.sh b/firehol.sh >index 6acb497..f5dba16 100755 >--- a/firehol.sh >+++ b/firehol.sh >@@ -238,8 +238,15 @@ ${IPTABLES_CMD} -nxvL >/dev/null 2>&1 > # ---------------------------------------------------------------------- > # Directories and files > >-# These files will be created and deleted during our run. >-FIREHOL_DIR="/tmp/.firehol-tmp-$$-${RANDOM}-${RANDOM}" >+# Create an empty temporary directory we need for this run. >+if ! FIREHOL_DIR="`mktemp -d -t .firehol-tmp-XXXXXX`" >+then >+ echo >&2 >+ echo >&2 >+ echo >&2 "Cannot create temporary directory." >+ echo >&2 >+ exit 1 >+fi > FIREHOL_CHAINS_DIR="${FIREHOL_DIR}/chains" > FIREHOL_OUTPUT="${FIREHOL_DIR}/firehol-out.sh" > FIREHOL_SAVED="${FIREHOL_DIR}/firehol-save.sh" >@@ -329,20 +336,6 @@ then > "${CHMOD_CMD}" 700 "${FIREHOL_CONFIG_DIR}/services" > fi > >-# Remove any old directories that might be there. >-if [ -d "${FIREHOL_DIR}" ] >-then >- "${RM_CMD}" -rf "${FIREHOL_DIR}" >- if [ $? -ne 0 -o -e "${FIREHOL_DIR}" ] >- then >- echo >&2 >- echo >&2 >- echo >&2 "Cannot clean temporary directory '${FIREHOL_DIR}'." >- echo >&2 >- exit 1 >- fi >-fi >-"${MKDIR_CMD}" "${FIREHOL_DIR}" || exit 1 > "${MKDIR_CMD}" "${FIREHOL_CHAINS_DIR}" || exit 1 > > # prepare the file that will hold all modules to be loaded. >-- >1.6.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246013
: 177606