Bug#684679: RFS: nullmailer/1:1.11-2 (security bugfix upload request)
On Sun, Aug 19, 2012 at 10:16:50AM -0700, Don Armstrong wrote:
> If bartm is unable to upload this, I will do it. However, you need to
> first check that /etc/nullmailer/remotes is a regular file, as it
> would be a perfectly reasonable configuration to have replaced
> /etc/nullmailer/remotes with a symlink. Secondly, you really should
> only do the replacement if /etc/nullmailer/remotes is world readable;
> otherwise you should assume that the administrator has modified things
> (for example, running nullmailer as an entirely different user).
Hi Don,
You raise some valuable issues, thanks. I think that merely not
replacing, chmodding or chowning the file if it already exists is a
simple and safe solution which allows the sysadmin to change what she
wants post-installation.
This does mean that existing installations will not be protected, but
I don't think that that's important enough to be worth a NEWS entry to
warn the admin.
Thankyou very much for your review. I've amended the package accordingly
and re-uploaded to mentors, and I hope it passes muster for upload.
The updated debdiff is attached (same version number, new changelog
timestamp).
Thankyou
Nick
diff -Nru nullmailer-1.11/debian/changelog nullmailer-1.11/debian/changelog
--- nullmailer-1.11/debian/changelog 2012-06-16 16:36:28.000000000 +0100
+++ nullmailer-1.11/debian/changelog 2012-08-20 23:02:07.000000000 +0100
@@ -1,3 +1,9 @@
+nullmailer (1:1.11-2) unstable; urgency=low
+
+ * Make 'remotes' not world-readable (Closes: #684619)
+
+ -- Nick Leverton <nick@leverton.org> Mon, 20 Aug 2012 23:02:04 +0100
+
nullmailer (1:1.11-1) unstable; urgency=low
* New upstream release
diff -Nru nullmailer-1.11/debian/postinst nullmailer-1.11/debian/postinst
--- nullmailer-1.11/debian/postinst 2012-05-16 08:25:36.000000000 +0100
+++ nullmailer-1.11/debian/postinst 2012-08-20 23:01:04.000000000 +0100
@@ -24,6 +24,13 @@
fi
db_get nullmailer/relayhost
+ # securely create nullmailer/remotes with mode 0600
+ if [ ! -L /etc/nullmailer/remotes -a ! -e /etc/nullmailer/remotes ]
+ then
+ R=$( tempfile -d /etc/nullmailer -p nullm )
+ chown mail:mail $R
+ mv $R /etc/nullmailer/remotes
+ fi
echo "$RET" | sed -r -e ':a s/(\[[^]:]*):/\1=/; ta' \
-e 's/[[:space:]]*:[[:space:]]*/\n/g' \
-e ':b s/(\[[^]=]*)=/\1:/; tb' \
Reply to: