You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The permissions for the passphrase file, /mnt/azure_bek_disk/LinuxPassPhraseFileName, which is seemingly the same for both the OS and data disks, is 755. I think that this is pretty insecure, since any limited user (non-root, non-superuser) can read the key.
Once the VM is up, login with the regular non-root user and run:
whoami
stat -c "%a %n" /mnt/azure_bek_disk/LinuxPassPhraseFileName
cat /mnt/azure_bek_disk/LinuxPassPhraseFileName
For extra sanity/verification, add a new user, e.g. called "limiteduser":
sudo adduser limiteduser
sudo passwd limiteduser
Changing password for user limiteduser.
New password: 123
BAD PASSWORD: The password is shorter than 6 characters
Retype new password: 123
passwd: all authentication tokens updated successfully.
Switch to the user and try to read the file again
su - limiteduser
whoami
cat /mnt/azure_bek_disk/LinuxPassPhraseFileName
The text was updated successfully, but these errors were encountered:
Password by default still or again readable for unprivileged users after creating a server, adding multiple data disks and encrypting the disks using az vm encryption enable
ls -l /mnt/azure_bek_disk/LinuxPassPhraseFileName
-r-xr-xr-x 1 root root 172 Feb 11 10:31 /mnt/azure_bek_disk/LinuxPassPhraseFileName
On a second server with a similar setup, the permissions where 0644, after I changed to 0400 and restarted, the permission set was reset to 0555.
The permissions for the passphrase file, /mnt/azure_bek_disk/LinuxPassPhraseFileName, which is seemingly the same for both the OS and data disks, is 755. I think that this is pretty insecure, since any limited user (non-root, non-superuser) can read the key.
To reproduce:
Deploy a new VM with this template:
https://github.com/Azure/azure-quickstart-templates/tree/master/101-vm-full-disk-encrypted-rhel
Once the VM is up, login with the regular non-root user and run:
The text was updated successfully, but these errors were encountered: