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

Option to disable USB ports #211

Open
ghost opened this issue Jan 14, 2019 · 8 comments
Open

Option to disable USB ports #211

ghost opened this issue Jan 14, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Jan 14, 2019

Disable USB ports on the machine to help with physical security. This would mean that people walking up to the machine could not insert USB keyboards or storage devices and gain any control over the system.

Threat Model

When the internals of the machine are somewhat secured, an attacker could plug in USB keyboards or storage devices to alter the boot process. Since these devices can be small and inconspicuous, it's possible to insert them quite quickly while casually walking through a data center.

We assume that the administrator of the machine is trusted to enable/disable this as needed.

Solution

NVRAM configuration option to disable certain PCI devices (e.g. USB controllers). This could have a graphical interface in Petitboot to be more user friendly.

We currently have no way to set these options from the BMC, so if we wanted this in the future we'd have to work out a IPMI sensor or similar.

@ghost ghost added the enhancement label Jan 14, 2019
@jk-ozlabs
Copy link
Member

If this is just an admin-level thing, couldn't it be easily done in the OS as an init script?

@ghost
Copy link
Author

ghost commented Jan 14, 2019

The thought is that then we're covered in petitboot as well, so it prevents boot options being changed.

@sammj
Copy link
Contributor

sammj commented Jan 14, 2019

https://en.m.wikipedia.org/?title=Hot_glue_gun

But more seriously, the GUI part could be covered by this recent series: https://lists.ozlabs.org/pipermail/petitboot/2018-December/001251.html

If this is just an admin-level thing, couldn't it be easily done in the OS as an init script?

Does that leave us open to a gap while Petitboot is coming up?

@jk-ozlabs
Copy link
Member

Ah, good point.

We could do this in petitboot userspace (to cover the petiboot environment too), but would need to ensure that the implementation doesn't allow for a hotplug race. udev rules should be fine. However, then we'd need to duplicate the behaviour in the distro OS, which would be a bit of a hassle for the user.

So, perhaps something that sets status = "disabled" properties on the DT notes within skiboot, matching a particular PCI class and/or (vendor,device) types?

@ghost
Copy link
Author

ghost commented Jan 14, 2019 via email

@oohal
Copy link
Contributor

oohal commented Jan 14, 2019 via email

@klauskiwi
Copy link

I took a look at the discussion around PR #2790 and looks like we have some consensus that the solution presented there is ready to be merged, but it also must be explicitly enabled in a _defconfig for the desired platform to show this characteristic (disable USB by default). Any objections to merging it?

@klauskiwi
Copy link

In an e-mail discussion with Kevin Kehne and Chet Mehta, they confirmed that the request is to allow a runtime-configurable policy to completely disable USB support - that includes Host OS as well.

I don't think that Pull Request #2790 is able to achieve this.

@oohal, you commented some other way in which this could be achieved, can you clarify?

@jk-ozlabs Sam mentioned this RFC patch as a possible mechanism to configure this, although I didn't see a clear way in which this could be protected under a password or similar. Thoughts?

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

No branches or pull requests

4 participants