MAC for i2c devices

Open
#285 1 comment 0 reactions 1 assignee View on GitHub

@bcantrill is already working on this.

Since Dec 3, 2021.

Assessment

This issue has not been assessed yet.

Description

🤔 design affects-humility security stm32

Notes from an idea we discussed today.

We'd like Humility (via hiffy) to be able to mess with PMBus devices. However, we don't want it to be able to screw up the power and sequencing loops by messing with devices they're using -- it will have to talk to the tasks managing the loops instead.

We could implement this as a special case of a more general feature: mandatory access control for PMBus devices.

  • Indicate in the configuration file which task(s), if any, are allowed to mess with each device.
  • Compile this into a table in the driver.
  • Have the i2c server check requests against the table and deny bogus ones.

This would provide a useful integrity check against malfunctioning drivers trying to mess with i2c devices they don't control. Failures in this sort of MAC would be an ideal use case for the REPLY_FAULT operation that I keep threatening to implement, but, it could be an error code for now.

Note that this would prevent these devices from being scanned by humility. This is probably good, since scans can be dangerously side-effecting (thanks, i2c!).

Dominant language
Rust
Stars
3.6k
Forks
239
Avg merge
1d 12h
Merged PRs (30d)
23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oxidecomputer/hubris

All issues in oxidecomputer/hubris

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.