Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flasher image non-interactively destroys data without confirmation #407

Open
jakogut opened this issue Sep 30, 2021 · 0 comments
Open

Flasher image non-interactively destroys data without confirmation #407

jakogut opened this issue Sep 30, 2021 · 0 comments

Comments

@jakogut
Copy link
Contributor

jakogut commented Sep 30, 2021

The meta-balena-genericx86 layer specifies installation to several common block devices, including nvme0n1, sda, sdb, etc. that are present in many PCs. The flasher script currently does not require input or confirmation before wiping a disk and destroying all the data on it, nor does it allow users to specify or restrict the disks or machine it's to be installed on.

Even worse, downloading an image through the CLI gives no indication that it's a flasher image, or that booting it will wipe your disk without confirmation.

┌─[15:32:20]─[joseph@wash]
└──> ~ $ >> balena os download genericx86-64-ext -o balenaos.img
Getting device operating system for genericx86-64-ext
OS version not specified: using latest stable version
The image was downloaded successfully
┌─[✗]─[15:33:22]─[joseph@wash]
└──> ~ $ >> sudo mount $(sudo losetup -fP --show balenaos.img)p2 /mnt \
> && find /mnt 2>/dev/null -name resin-init-flasher.service
/mnt/etc/systemd/system/multi-user.target.wants/resin-init-flasher.service
/mnt/lib/systemd/system/resin-init-flasher.service

Consequently, a user attempting to write this image to a thumb drive to boot balenaOS externally, leaving all their data intact, would be in for a rude suprise as their disk is wiped. Anybody accidentally booting from this drive in the future (Is this my Arch installation media?) would also wipe their drive without warning or confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant