#1069899 lvm2: do not copy SELinux contexts in initramfs hook

Package:
lvm2
Source:
lvm2
Description:
Linux Logical Volume Manager
Submitter:
Christian Göttsche
Date:
2024-04-26 17:57:03 UTC
Severity:
normal
Tags:
#1069899#5
Date:
2024-04-26 17:55:29 UTC
From:
To:
Dear Maintainer,

when copying files into the temporary initramfs working directory the
SELinux security contexts are copied verbatim.
This can lead to issue when the original context is not allowed on the
destination filesystem and the process needs elevated access to the
original context.

See https://salsa.debian.org/debian/plymouth/-/commit/3edb1985b586b8362ef206c894ba6926f96e2e5f
for a similar situation in plymouth.
See https://salsa.debian.org/lvm-team/lvm2/-/merge_requests/3 for a
salsa merge request.

Regards,
       Christian Göttsche

diff --git a/debian/initramfs-tools/lvm2/hooks/lvm2
b/debian/initramfs-tools/lvm2/hooks/lvm2
index b28901a01..46a01b615 100755
--- a/debian/initramfs-tools/lvm2/hooks/lvm2
+++ b/debian/initramfs-tools/lvm2/hooks/lvm2
@@ -16,7 +16,7 @@ esac

. /usr/share/initramfs-tools/hook-functions