Skip to content

Commit

Permalink
kernel: restrict permissions on System.map
Browse files Browse the repository at this point in the history
This is good practice although the security benefit is limited, since
unprivileged containers would need a volume mount to access the file,
and could be running as root.

Signed-off-by: Ben Cressey <[email protected]>
  • Loading branch information
bcressey committed Jun 17, 2022
1 parent 803ffce commit ebfbe7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/kernel-5.10/kernel-5.10.spec
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ sed -i \
-e 's,$(CONFIG_SYSTEM_TRUSTED_KEYRING),n,g' \
scripts/Makefile

# Restrict permissions on System.map.
chmod 600 System.map

(
find * \
-type f \
Expand Down
3 changes: 3 additions & 0 deletions packages/kernel-5.4/kernel-5.4.spec
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ sed -i \
-e 's,$(CONFIG_SYSTEM_TRUSTED_KEYRING),n,g' \
scripts/Makefile

# Restrict permissions on System.map.
chmod 600 System.map

(
find * \
-type f \
Expand Down

0 comments on commit ebfbe7f

Please sign in to comment.