Skip to content

Commit 6f91b49

Browse files
committed
Change the system.map file permission only readable by root
1 parent 7ee50c9 commit 6f91b49

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 01e598f75f4ab650555b01116ceec4e5c8f2899b Mon Sep 17 00:00:00 2001
2+
From: xumia <[email protected]>
3+
Date: Thu, 7 Sep 2023 02:53:49 +0000
4+
Subject: [PATCH] Change the system.map file permission only readable by root
5+
6+
---
7+
debian/rules.real | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/debian/rules.real b/debian/rules.real
11+
index 3304579ad..908258789 100644
12+
--- a/debian/rules.real
13+
+++ b/debian/rules.real
14+
@@ -505,7 +505,7 @@ install-image-dbg_$(ARCH)_$(FEATURESET)_$(FLAVOUR): $(STAMPS_DIR)/build_$(ARCH)_
15+
dh_installdirs usr/lib/debug usr/lib/debug/boot usr/share/lintian/overrides/
16+
dh_lintian
17+
install -m644 $(DIR)/vmlinux $(DEBUG_DIR)/boot/vmlinux-$(REAL_VERSION)
18+
- install -m644 $(DIR)/System.map $(DEBUG_DIR)/boot/System.map-$(REAL_VERSION)
19+
+ install -m600 $(DIR)/System.map $(DEBUG_DIR)/boot/System.map-$(REAL_VERSION)
20+
+$(MAKE_CLEAN) -C $(DIR) modules_install DEPMOD='$(CURDIR)/debian/bin/no-depmod' INSTALL_MOD_PATH='$(CURDIR)'/$(DEBUG_DIR)
21+
find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/ -mindepth 1 -maxdepth 1 \! -name kernel -exec rm {} \+
22+
rm $(DEBUG_DIR)/lib/firmware -rf
23+
--
24+
2.30.2
25+

patch/series

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ armhf_secondary_boot_online.patch
260260
0029-arm64-traps-Handle-SError-interrupt.patch
261261
0030-quirks-for-the-Pensando-qspi-controller.patch
262262

263+
# Security patch
264+
0001-Change-the-system.map-file-permission-only-readable-.patch
265+
263266
#
264267
#
265268
############################################################

0 commit comments

Comments
 (0)