crouton uses /bin/sh everywhere (which of course is symlinked to dash), so I think you'll be seeing crash reports from crouton users (about 4% of canary users). Is that what you were intending?
So it looks like we need to do the following (please provide your thoughts):* the installer/crouton indirect downloader (everyone's entryway into the installer) will need to either remount exec /tmp or bind-mount the cache subdirectory and execify it before executing the installer bundle.
* the README needs to be updated with a big warning about needing to install crouton to /usr/local before running. The question is what the canonical commands should be that everyone inevitably copy-pastes? /usr/local/bin doesn't exist by default, so creating it is an additional step. We could also just instruct to dump it in /usr/local, but then you'd have to specify the full path when running it.
Alternatively, we could tell people to remount their profile exec, but that also seems like a bad idea (especially since you'll have to do it again when updating crouton later).
I'm assuming you're going to try to break curl xyz | sh so not suggesting that as a potential fix :)
* the README needs to be updated to discuss running crouton on external media, which will be pretty broken. I think the best option is just tell people to execify the entire mount, which is a bit of a shame, since crouton was designed to avoid doing precisely that. The point of this approach is to allow people to launch their chroot off of a USB stick without touching the stateful partition at all.
* Once we decide on the canonical commands, we need to notify the source of 25.5% of direct links (listed above) to update their tutorials.You may also want to reach out to https://github.com/reynhout/chrx, since they're going to have the same issues with out-of-date READMEs and tutorials.
On Mon, Mar 11, 2019 at 3:33 PM David Schneider <dnsc...@chromium.org> wrote:crouton uses /bin/sh everywhere (which of course is symlinked to dash), so I think you'll be seeing crash reports from crouton users (about 4% of canary users). Is that what you were intending?i think there might be some confusion here. if you have a file with a shebang of #!/bin/sh, and that file is marked +x, and it is executed directly (e.g. ./foo.sh), then nothing is changing. in order to execute a script like that, it must already be on a exec mount point, and we have no plans on changing that.we're talking about cases where you save the file to a noexec mount (e.g. the Downloads directory), and then manually run `sh foo.sh` on that file. the user will see a warning that it's no longer supported, and it'll generate a crash report. getting details on who/what all exactly is affected is intended, even if it means we gather crashes from use cases that we don't intend on "fixing".
So it looks like we need to do the following (please provide your thoughts):* the installer/crouton indirect downloader (everyone's entryway into the installer) will need to either remount exec /tmp or bind-mount the cache subdirectory and execify it before executing the installer bundle.would strongly recommend not changing /tmp. making that more insecure by default will affect the rest of the system.i'm not sure cache subdirectory you're referring to. i assume that's some crouton thing as CrOS doesn't have that.
* the README needs to be updated with a big warning about needing to install crouton to /usr/local before running. The question is what the canonical commands should be that everyone inevitably copy-pastes? /usr/local/bin doesn't exist by default, so creating it is an additional step. We could also just instruct to dump it in /usr/local, but then you'd have to specify the full path when running it.i assume you have a "one line" that people will be blindly copying & pasting right ? so it doesn't need to be a single command.cd /usr/local && curl ... -o ... && sh ... --installbased on the --install flag, you could have it relocate $0 to bin/ and chmod as makes sense.
Alternatively, we could tell people to remount their profile exec, but that also seems like a bad idea (especially since you'll have to do it again when updating crouton later).right, like /tmp, we don't want to encourage things that impact the security of the overall system.I'm assuming you're going to try to break curl xyz | sh so not suggesting that as a potential fix :)i don't think it breaks or warns right now, but we do want to break that eventually. it'll probably be harder to workout of the system though as upstart relies on it currently.
* the README needs to be updated to discuss running crouton on external media, which will be pretty broken. I think the best option is just tell people to execify the entire mount, which is a bit of a shame, since crouton was designed to avoid doing precisely that. The point of this approach is to allow people to launch their chroot off of a USB stick without touching the stateful partition at all.i think that about covers it. people can either manually remount -o exec, or they can copy the launcher to /usr/local/bin/. i get that it's kind of nice to have a usb stick that is completely independent and doesn't rely on /usr/local content, but it seems like the number of users of this esoteric flow doesn't justify keeping the security sacrifice. i'm not coming up with a better answer atm.
* Once we decide on the canonical commands, we need to notify the source of 25.5% of direct links (listed above) to update their tutorials.You may also want to reach out to https://github.com/reynhout/chrx, since they're going to have the same issues with out-of-date READMEs and tutorials.considering the usage numbers (no updates in months, 4 contributors, <200 total commits), seems like the existing notification flow should be sufficient. either they'll get the message and update, or they won't because no one uses it anymore ;).
we're only talking about making it warn for now, and it'll be staged over a release or two, so it most likely will be O(months) between the warnings showing up and then the calls being fatal.
--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
--