Timeline for Cannot execute binary file from USB drive
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 19, 2015 at 21:58 | vote | accept | Jacobm001 | ||
Feb 18, 2015 at 5:38 | comment | added | Peter | Let us continue this discussion in chat. | |
Feb 18, 2015 at 5:35 | comment | added | Jacobm001 | Okay, I will experiment with it a little tomorrow and will edit my answer to reflect your suggestions. All my stuff is backed up to a personal git server, so I suppose it isn't really that necessary. Thank you for the input. :) | |
Feb 18, 2015 at 5:30 | comment | added | Peter | You can try using the uuid="uuid-of-fs" construct in your fstab, but I am not sure if it will work on the RPi distro you're using. (I do all my dev using svn so I have multiple copies, and can revert nicely.) the construct goes as: UUID=uuid-of-fs /mount/point fstype (options) The UUID can be found in linux using "sudo blkid" command. | |
Feb 18, 2015 at 5:25 | comment | added | Jacobm001 | Fair enough. Is there a more specific way to allow this drive, or is this a stupid practice entirely? | |
Feb 18, 2015 at 5:23 | comment | added | Peter | It is a risk, since as the fstab you mentioned says, the device it's looking at is /dev/sda1, which is any device that reports as sda1, is mounted at /mnt/usb with exec permissions. This means, I can pull out your usb key, swap it with mine, and reboot. It would respond as /dev/sda1, it will be mounted at /mnt/usb, with full exec permissions, and if my usb key isn't as nice as yours, I'll write my badness to your sd card, and until you reformat it, I've got control. | |
Feb 18, 2015 at 5:13 | comment | added | Jacobm001 | Is it a risk when it is only a single drive, mounted to a single point in the file system? This isn't setting the default for all usb drives, just this one. Is there a difference between how this is setup and hooking up a hard drive? | |
Feb 18, 2015 at 5:09 | comment | added | Peter | While from a practicality point of view I fully understand, it is much easier to pop a usb drive in and run your program, I just wanted to say that this set-up does leave an attack vector open. I am (self admittedly) a bit of a security nut. Perhaps something like svn would work for you here. When I used to admin for a university, this is the method I would allow for student written execs. (since universities are huge targets, allowing exec on a usb key is very compromising to overall security). Just a thought :) | |
Feb 18, 2015 at 4:58 | comment | added | Jacobm001 | @Peter while this is a removable drive, it's being used as fixed storage. Since I'm experimenting with systems programming, I'm trying to keep most of my projects off the SD card in case I need to reformat the sd card again. I don't want any binary file to be executable, I simply want to be able to run what I've given +x rights. | |
Feb 18, 2015 at 4:55 | comment | added | Peter | Coming from a sys admin background, I would question the fact that you want to allow exec permissions to ALL of /mnt/usb, since it seems you want to use that drive amongst several systems. Generally this isn't advised from a security standpoint, since it will allow any executable to run from the usb drive, including various malware. It is more secure to explicitly copy the desired file(s) to the RPi, than allow arbitrary execution on a removable drive. Which is why you ran in to the problem in the first place ;) | |
Feb 16, 2015 at 21:43 | history | edited | Jacobm001 | CC BY-SA 3.0 |
added 2 characters in body
|
Feb 16, 2015 at 21:18 | history | answered | Jacobm001 | CC BY-SA 3.0 |