fs/tar: only store numeric uid/gid
PATCH 1/1 fs/tar: only store numeric uid/gid
If a target user is asigned a UID (e.g. 1000) that happens to also exist on the build machine, tar will happily store the username for that user.
This can be seen by some as potential information disclosure.
Instruct tar to just store the numeric uid/gid.
---
Yes, there are so many other locations where we may have such information disclosure. But this one is pretty easy to fix.
--- fs/tar/tar.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/tar/tar.mk +1 -1
@@ -7,7 +7,7 @@ TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS)) define ROOTFS_TAR_CMD - tar -c$(TAR_OPTS)f $@ -C $(TARGET_DIR) . + tar -c$(TAR_OPTS)f $@ --numeric-owner -C $(TARGET_DIR) . endef $(eval $(call ROOTFS_TARGET,tar))
Signature · 1 line
1.9.1
PATCH 1/1 fs/tar: only store numeric uid/gid
Dear Yann E. MORIN,
Quoted 8 lines · Yann E. MORIN
If a target user is asigned a UID (e.g. 1000) that happens to also exist on the build machine, tar will happily store the username for that user.
This can be seen by some as potential information disclosure.
Instruct tar to just store the numeric uid/gid.
Signed-off-by "Yann E. MORIN" <[email protected]>
I hesitated a bit on this one, but I preferred to err on the safe side, and therefore applied this patch to the 'next' branch.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com