packaging: make System.map mode 0600
authorKees Cook <kees@ubuntu.com>
Fri, 14 Jan 2011 20:24:57 +0000 (12:24 -0800)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:52:52 +0000 (06:52 -0700)
To complement the 0400 /proc/kallsyms patch, this makes the installed
System.map file mode 0600 so that security vulnerability exploitation
isn't as trivial. This, like kallsyms, does not stop a serious attacker,
since they can always just fetch the package and read the file.

I'm not aware of any non-root consumer of this file, so there should be
no impact. FWIW, my system boots fine with this change.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

debian/rules.d/2-binary-arch.mk

index 5627af5..c289d11 100644 (file)
@@ -67,7 +67,7 @@ endif
                $(pkgdir)/boot/config-$(abi_release)-$*
        install -m644 $(abidir)/$* \
                $(pkgdir)/boot/abi-$(abi_release)-$*
-       install -m644 $(builddir)/build-$*/System.map \
+       install -m600 $(builddir)/build-$*/System.map \
                $(pkgdir)/boot/System.map-$(abi_release)-$*
 ifeq ($(no_dumpfile),)
        makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \